Have you recently tried to create a new Google Analytics 4 property, finding yourself staring at gtag or Google Tag Manager options to do so?
Some people find this pretty confusing.
Like which is which? Deciding if one is better than the other can also be challenging.
As cookies are fast becoming a thing of the past, businesses rely on tags to collect the data they need to send to their GA4 properties for in-depth analytics.
Hang on to your seats as we explain what a gtag is and whether or not you should use it.
Google tag or gtag is a single JavaScript tag (gtag.js) deployed across the website to track website and ad performance in Google Ads and Google Analytics 4.
A tag is a small piece of code collecting information from web pages.
So, when you use a gtag, instead of installing and deploying multiple tags for various Google products, you rely on gtag alone.
It will collect all the relevant information and send it to the destinations (Google Ads and Google Analytics 4).
Finally, for those of you who might be wondering if gtag is an upgrade on the Google Analytics configuration tag (analytics.js), it isn’t.
I mean it is pretty obvious, isn’t it? GA configuration tag is limited to GA alone. Gtag, on the other hand, supports an increasing list of Google products.
Google tag makes your life easier by removing the need to maintain several tags to keep track of your performance on multiple products.
You have to do three things to use gtag.
Let us go over each of these one by one.
A tag ID is an identifier added to the website to load a tag.
You follow different steps to find your gtag ID on Google Ads, Google Analytics 4, and Google Tag Manager.
To find your gtag ID in GA4, follow the steps below.
You should already manage a Google Ads, GA4, or Google tag in a container to find the gtag ID in Google Tag Manager.
You must have set up conversion tracking in Google Ads before installing the gtag via Google Ads.
Follow the steps below to find your gtag ID in Google Ads.
Remember You can set up Google tag without using a code if you install it using a CMS or website builder. |
Now that you have your Google tag ID it is time to install it on your website.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
Once you install gtag on your website, configure it to send user interaction data to destinations.
It is time to verify if your gtag is working and sending data to destinations.
Once your gtag is up and running, it collects user data, their interaction and the actions performed on your website, and ads to destinations.
Gtag |
Google Tag Manager |
A single JavaScript code to track user behavior and send data to all Google destinations. |
GTM is a tag management solution that less technical people can use to create and install tags. |
Exclusively used for Google products like Google Analytics 4 (and its paid versions) and Google Ads. |
It manages tags for Google products and other tools like Facebook pixels. |
Since gtag is a code snippet, one must have coding knowledge to edit it. |
GTM is a central location to create and manage your tags and involves dealing with user-friendly templates. |
Gtag must be written and deployed by a coder. |
Offers access controls to allow marketers to create tags, and the coder can review them before publishing them. |
Google Tag Manager is a better option than gtag because it is simpler, easier, and does not require a lot of technical skills.
So, marketers can go on to create variables and triggers, then create a tag and link the trigger to fire up the tag every time a user performs a specific action.
A developer can review and publish the changes in GTM to ensure it is technically sound.
But there are times when using a gtag is preferable to GTM.
Gtag is a single JavaScript code that collects and sends data to Google products Google Analytics 4, and Google Ads to track the performance of your website and ads.
It is a code snippet that goes into the header code of all your website pages that you wish to track and monitor.
To use gtag, one needs to find their gtag ID, add it to the header code of all pages of their website, configure it, and verify it is working.
Gtag has several differences from Google Tag Manager. The former is a code, whereas the latter manages tracking codes (tags).
Gtag is technical, offers more control, and supports only Google products.
GTM on the other hand needs less technical capabilities, allows user access controls, and easy handling.
In some situations, however, gtag is preferable over GTM.
Like what you read? Learn more about Digital Analytics in our blog here.