Google recently started to show a new type of tracking option inside of Analytics called Global Site Tag (gtag.js), replacing the Universal Analytics (analytics.js) tracking option. Going forward this will be the suggested tracking script.
What is Global Site Tag?
Basically it is the new tracking script for Google Analytics. This will replace the current Universal tracking script. Google will start to show the new tag for users more and more as time goes on and more features are added. It is Google’s way of standardizing all of their different tracking methods. You can see how the script is hosted at Google Tag Manager hints towards the best practice of consolidating script management into one location.
Can I migrate analytics.js to gtag.js?
Yes absolutely! Check out Google’s migration guide here.
Do I need to migrate now?
Nope, and I would not suggest it at the time of writing this article as it is still in beta, and there will be a lot of new features added in the coming, weeks, months, and maybe year. There is no clear advantage to changing to Google Global Site Tag yet. But keep it in mind for upcoming maintenance tasks that your developer may be doing, so they can add it later when ready.
Old Analytics Code?
Can’t find the analytics.js code that used to show in Analytics? Visit the Google Guide on analytics.js for the original code. Click here