I am using the async tracking code. In my page <body> I am calling:
_gaq.push(['_setCustomVar', 3, 'Name', 'Value', 3 ]);
_gaq.push(['_trackPageview']);
All good so far. But I have recently added the following code which is triggered on certain actions on the page:
_gaq.push(['_trackPageview', url]);
In Analytics, it doesnt look like my custom variables are being registered for these triggered pageviews. Do I need to call _setCustomVar again, immediately before calling _trackPageview?
I assumed that calling _setCustomVar the first time was sufficient..
That final argument,
3, in the_setCustomVarmakes it a page-level custom variable. That means that it will attach to the first pageview, but never again after that.If you’d like the custom variable to apply for the whole session (ie, the visit), set it to
2. To make it last across sessions (ie, visitor level), set it to1.