analytics.js and ga.js on same website but different pages[ Edited ]
December 2015 - last edited December 2015
I'm looking to upgrade our website to universal analytics (analytics.js). We have a number of pages which fire events and ecommerce data so this might take some time and would like to avoid big bang approach.
- Is it possible to upgrade some pages to analytics.js but leave other pages on ga.js for the time being? I do not plan on ever having both on the same page.
- Are there any implications on this (other than ensuring that each page fires the appropriate code for events and ecommerce data)?
- Will pages still be tracked in same session as people browse around the site and therefore switch back and forth between both?
- Anything else to be aware of when doing this?
I see from this link:
that this is possible due to mention of "such as with larger websites that have not completely retagged with analytics.js and have both tracking codes present for some period of time."
but confused exactly what it means when it talks about cookie imports. If I'm using standard cookie names and have not customised them at all then will this just work without any extra effort other than replacing the tag with the analytics.js tag and updating any events and ecommerce code to the new format at the same time? Especially when going back from analytics.js to ga.js on some pages.
Re: analytics.js and ga.js on same website but different pages
Although it might be technically feasible to interchange old and new Analytics-code versions on a page-to-page level, things surely get more complicated with session metrics. So, I wouldn't recommend that mixture on a live website. I would try instead to do all testing on a development server (and by the way possibly switching to Google Tag Manager if you have to re-tag everything anyway).
Get your daily news with Google Analytics Recommended Reading 2017 and Google AdWords Recommended Reading 2017 on Google+