gtagjs
gtag.js, short for Global Site Tag, is Google's unified tagging framework for websites. It provides a single tag to implement and configure Google Analytics, Google Ads, and other Google marketing products. The goal is to simplify tagging by standardizing data collection across services and reducing the number of separate tags a site must manage.
The library loads asynchronously from Google's servers and uses a dataLayer array to store commands and data.
Typical usage involves including the gtag.js script in the page and issuing configuration calls, for example
gtag.js is the recommended tagging method for new implementations and it supersedes older tagging approaches like