top of page

Difference between Google tag, Tag Manager and gtag.js

Google tag: The Google tag is a versatile tool that you can add to your website to track both organic and ad performance. It allows you to configure Google Analytics and send data to other products, such as Google Ads, by setting up destinations within the tag. To connect data from the Google tag to your Google Analytics account, you need to accept the Google Analytics Terms of Service (ToS). For setting up the Google tag with Google Analytics, we recommend using Google Tag Manager. Important Note: The Google Analytics: GA4 Configuration tag has now been consolidated into the Google tag. If you previously used Google Analytics configuration tags, these have been automatically upgraded to the Google tag, so there is no need for further action. Your measurement settings and capabilities remain unchanged, and your existing Google Analytics event tags will continue to function as before. Google Tag Manager: Google Tag Manager is a web-based system that allows you to create and manage Google tags and install them on your website without manually adding JavaScript snippets. You can also update existing tag settings through Tag Manager without needing to re-deploy your site. Google Tag Manager supports the Google tag for Google Analytics, a wide range of third-party tags, and even custom tags. gtag.js: If you are already using Google Tag Manager, you do not need to use gtag.js. gtag.js is a JavaScript framework used for adding Google tags directly to web pages. To use gtag.js effectively, familiarity with HTML, CSS, and JavaScript is required. Note: gtag.js does not support third-party or custom tags and can only send data to Google services. If needed, you can migrate your tags from gtag.js to Google Tag Manager.
gtag.js Cookie Usage: The gtag.js JavaScript library utilizes first-party cookies to identify unique users and track user sessions. The recommended JavaScript snippet sets cookies at the highest domain level possible. For example, if your website is blog.example.co.uk, gtag.js sets the cookie domain to .example.co.uk. This approach allows measurement across subdomains without additional configuration. Note: gtag.js does not require cookies to transmit data to Google Analytics. However, gtag.js sets the following cookies: 1. Cookie Name: _ga Default Expiration Time: 2 years Description: Used to distinguish users. 2. Cookie Name: ga Default Expiration Time: 2 years Description: Used to persist session state.
bottom of page