Google Analytics Custom dimension doesnt work
- SEO |
I'm having some troubles with the custom dimension that i set in my file's header. The analytics is linked to my site because i get on the analytics the real time count.
That been said, as you can see in the code there is a JS variable iduser it contains the value of a div that has the current ID of the user connected.
I created the dimension based on Hit so i make some interactions in my page but i don't get the value of userid in my custom reports
I was wondering if some of you can help and tell me where my set up is wrong ?
NOTE: The name of the dimension in my GA is : dimension1
Code is below.
Thank you so much in advance
(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');
iduser = $('#userid').text();
ga('create', 'UA-xxxxxxxxxxx', 'auto');
ga('set','dimension1', iduser);
ga('send', 'pageview');
-
savidge4 -
[ 1 ] Thanks - Reply
- 1 reply
SignatureSuccess is an ACT not an idea{{ DiscussionBoard.errors[11409851].message }}-
kurosaki4d -
Thanks - Reply
{{ DiscussionBoard.errors[11414778].message }} -
-