Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm having some trouble to make GA Custom variables work on my website. After following all the tutorials, seeking documentation, debugging with Firebug, I cannont understand what is wrong with my code...

Here is the test page I wrote, to have a very targeted test case:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Custom variable test</title>
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-13048570-1']);
    <script type="text/javascript">
    <h1>Hello on my custom variable test!</h1>
    <script type="text/javascript">
        (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();

My problem is that the custom variables never reach Google Analytics. I've installed the Google Analytics debugger found here (http://www.keithclark.co.uk/labs/google-analytics-debugger/) for Firefox; and when submitting my page, it shows me that two custom variables are set but the name and value are empty; despite the fact that the generated GIF has utme parameter inline (utme 8(pageName*secondCustomVar)9(testCustomVar*testValue)).


I really have no more ideas why this is not working.

share|improve this question

migrated from stackoverflow.com Dec 16 '13 at 16:47

This question came from our site for professional and enthusiast programmers.

I removed my obviously dumb answer (the scope parameter is even called opt_scope in the docs, which is kind of a giveaway :-) ). So next question would be, how long did you wait ? Custom vars are one of those things that take between 4 to 48 hours to appear (if you account has more then 200 000 hits per day it will be updated only once a day according to documentation), so the info might not be processed yet. –  Eike Pierstorff Dec 13 '13 at 14:43
I just tough a little bit about that ; and indeed ; when almost every data is available very quickly, it seems that custom variables do have a certain lag... So, next step will be to create a new test case with a unused slot, on an unused page, and test again... –  Romain VDK Dec 16 '13 at 15:30
Can you please provide the URL of our site? Also, I would recommend you to set the scope of each Custom Variable call (although it's an optional parameter). –  Yaniv Navot Sep 11 at 6:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.