- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Google Analytics Dimensions Not Working
Google Analytics Dimensions Not Working
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hello,
I setup Optimizely with analytics dimensions but when I go to Google Analytics, I have no dimension reported.
Page to check: https://www.odoo.com/page/crm
Note that:
- I followed the optimizely manual to activate analytics
- Optimizely is loaded before the analytics tracker
- The setup has been made a few days ago
- I previously made a mistake by loading analytics before optimizely, but I fixed it
For technical reasons, we use the variable "_gaw" instead of "ga" with universal analytics. I checked the .JS code of optimizely and it seams optimizely is using the "ga" variable statically. So, we added a window.ga = _gaw but it does not seems to work.
Can you help fix the issue?
Thanks,
Re: Google Analytics Dimensions Not Working
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hey there!
This is a great question, and looking at the code on your page, you're ALMOST on track with what you're trying to do.
Here's [some] of your code:
window.ga = _gaw;
window.optimizely = window.optimizely || [];
window.optimizely.push("activateUniversalAnalytics");
_gaw('send','pageview');
-------
The order of this part will not work, as you're defining ga as equal to _gaw, and then Optimizely pushes information into 'ga'. The reason this doesn't work is because the pageview call that is then sent, is ONLY for '_gaw' - so none of your Optimizely information would be sent in the call.
Another way to do this might be to pull out the information from the ga object which Optimizely pushes in, but this becomes very complex.
We do have another solution which requires some custom code which requires a bit of tweaking, so we are not posting this online, but I'd be happy to send this to you. Would you mind emailing me at support@optimizely.com ?
All the best,
Gary
Optimizely - Turning the World's data into action
Re: Google Analytics Dimensions Not Working
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I am having the same problem as Gary.
I setup Optimizely with analytics dimensions but when I go to GoogleAnalytics, I have no dimension reported.
Page to check: http://iautos.co/car-refinance/
I did the following:
- I followed the optimizely manual to activate analytics
- Optimizely is loaded before the analytics tracker
- The setup has been made a few days ago
Does the Analytics code snippet need to be placed after the Optimizely code on the page?
Re: Google Analytics Dimensions Not Working
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Yes, the Optimizely Snippet should be at the top of your <head> block. Then, within your UA code will be the code I pasted above for activating the UA integration in Optimizely.
Looking at your page, Please move the Optimizely Snippet above your UA code, then add these two lines above your ga(send, pageview) line of code:
window.optimizely = window.optimizely || [];
window.optimizely.push("activateUniversalAnalytics");
That should help!
Optimizely - Turning the World's data into action
Re: Google Analytics Dimensions Not Working
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Gary,
we did everything exactly as described above (and in the official tutorial) but it seems like Google Analytics won't recognize our Optimizely Index.
We use the same index in Optimizely as well as in GA.
GA doesn't recognize our personalized audience (the session value stays at 0).
Our site is www.miflora.de
Thanks a lot in advance,
Julius