gtag.js aka Global Site Tag is a tracking snippet for Google Analytics. Its predecessors are still widely used analytics.js and ga.js.
The goal of new Javascript is to unify the tracking of all Google Marketing suite products, mainly Google Analytics and Google AdWords.
Currently, gtag.js is the default snippet suggested by Google Analytics.
Here’s what Google says about gtag.js
The Global Site Tag (gtag.js) provides a framework for streamlined web page tagging – giving you better control while making implementation easier. Using gtag.js lets you benefit from the latest tracking features and integrations as they become available.
Useful links
- Official documentation
- What is gtag.js and when should I migrate?
- Add Client ID To Custom Dimension With gtag.js
Last modified: April 27, 2020
Want to see more articels like What is gtag.js? Check out all definitions in the Analytics Dictionary.