I've a custom dimension (#1) that has a value of 0 or 1. I set this custom dimension to every visitor on his first page once. So if he visits page two, this custom dimension won't set again.
So I expect that in my GA overview the sum of all visitors with cd1 value of 0 and 1 should be unique visitors. But that's not happen. Sum of all visitors with cd1 value of 0 and 1 is only 1/3 of my unique visitors.
That's my GA tracking code.
(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', '#######', {
'cookieDomain': '#######',
'cookieName' : '######',
'anonymizeIp': true,
'allowLinker': true
});
omnidoo.tracking.checkDimension(); //sets dimension like ga('set', 'dimension' + idDimension, value);
ga('send', 'pageview');
The request looks good too, because it sends parameter cd1 (custom dimension 1) with the pageview request. Value is 0 or 1 for this custom dimension.
Here you can look into the GA request and see that cd1 with value 0 or 1 is fired once. On reload or further pages, it won't appear again - is this maybe the problem? Do I've to fire it on every page or GA removes this dimension for this visitor? (To fire it again, you've to delete your cookies for this site and reload.)
That happens on my page:
- Check if user is new or has already a cookie.
- Set cookie with value 0 or 1 for A/B testing.
- Set custom dimension with 0 or 1.
- Fire pageview event.
- If user registers successfully fire event
registration.
At GA I have created a segment called register - just to count all registrations. It's set on eventcategory registration.
Than I've two segments for the A/B testing. And I expected that the sum of those segments should be the number of all unique visitors - but it's just 1/3 - althought every user gets a custom dimension 0 or 1. And when I mixup A/B testing and custom dimensions - to see which did better convert, the sum of this mixed (A/B testing 0 or 1 and custom dimension) segment should be as high as all tracked registrations - but this number is different too.
But it seems that there must be a problem in my implementation?!
visitor. - Jurikuserat custom dimension setup page. - Jurikuser. - Jurik