Mobile app version of vmapp.org
Login or Join
Cugini213

: I'm honestly not sure why your implementation isn't working properly, but just wonder if its more to do with Google Analytics having changed how they work to now use what they call Universal

@Cugini213

I'm honestly not sure why your implementation isn't working properly, but just wonder if its more to do with Google Analytics having changed how they work to now use what they call Universal Analytics, where instead of calling ga.js scripts now call analytics.js and Dimensions and Metrics have to be pre-configured in Google Analytics and assigned a numerical index each, e.g. dimension0, dimension1, dimension2 (not renamable) for text values, or metric0, metric1, metric2 etc for numerical values.

Read Google Developers: Google Analytics - Custom Dimensions and Metrics for more information.

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Custom variable test</title>
</head><body>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r,i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create','UA-13048570-1','auto');
ga('send','pageview','dimension0','testCustomVar');
ga('send','pageview','metric0',55.3);
</script>
<h1>Hello on my custom variable test!</h1>
</body>

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini213

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme