Using Custom Variables


#1

Hello,

I am trying to set up a Custom Variable using javascript, but it is not getting recorded in the back end dashboard.

Here is the full Piwik code that I am using:


<script type="text/javascript">
        var _paq = _paq || [];
	_paq.push(['setCustomVariable', 1,  'Location',  'OHare',  'page' ]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="//www.hiperos.com/piwik/";
            _paq.push(['setTrackerUrl', u+'piwik.php']);
            _paq.push(['setSiteId', 1]);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
            g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
        })();
    </script>
    <noscript><p><img src="//www.hiperos.com/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>

Am I just missing something?


(Matthieu Aubry) #2

It looks good and should work fine