Reputation: 12957
Here's my code:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'x']);
_gaq.push(['_setCustomVar', 1, 'business_id', 5, 3]);
_gaq.push(['_trackPageview']);
(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);
})();
</script>
I'm really not sure why they aren't coming across in GA. Any ideas?
Upvotes: 2
Views: 161
Reputation: 12957
I found the solution. The output for custom variables must be contained within quotes even if it's and integer.
Upvotes: 3