Google recently introduced a couple of exciting updates to Google Tag Manager!
They’ve added a new feature called Google Tag and included two settings variables.
These changes impact the way we set up Google Analytics 4.
We’ll cover the following:
- Google Tag Manager Interface Changes
- Setting Up Event Tracking in Google Tag Manager
- The New Event Settings Variable in Google Tag Manager
- The New Configuration Settings Variable
Let’s dive into the new Google Tag feature.
Google Tag Manager Interface Changes
If you are using Google Tag Manager, you might notice a new notification in your existing containers.
It says that: Your Google Analytics: GA4 Configuration tags will change to Google tags and will gain new capabilities, including settings variables.
The good news is that the existing configuration will not be impacted by this update, and we are not required to do anything with that.
However, if you’re keen on installing Google Analytics 4 using Google Tag Manager from scratch, the installation process will be a bit different.
Creating a New Configuration Tag for GA4
As you can see, the traditional Google Analytics 4 configuration tag is no longer available.
Instead, you need to choose Google Tag.
Now, you’ll be prompted to provide the Tag ID.
You can enter the Google Analytics 4 measurement ID (beginning with “g-“), the AdWords ID, or Google Tag.
In this post, we’re focusing on Google Analytics 4, so we’ll use the measurement ID. You can locate this ID in the same familiar location as before. Simply navigate to the admin section in Google Analytics 4, select your website data stream, and copy the measurement ID.
Copy it and paste it into the Tag ID above.
Our goal is to trigger your Google Tag swiftly, ideally as the very first tag, even before other GA4 event tags. That’s why we need to choose Initialization in the triggering section.
This basic setup installs Google Analytics and activates enhanced measurement, if enabled in your GA4 property.
Then name the tag, paste the measurement ID, and save.
Test it by clicking Preview, and entering your test website’s URL.
Check incoming events in Google Analytics 4’s debug view as well.
As we can see, the Google Tag template replaces the old GA4 configuration tag.
Adding Additional Parameters
The previous interface of configuring the GA4 tag and adding parameters looked like this:
Now we have the following view, where you can enter either configuration settings or shared event settings.
In the configuration settings section, you can add your server-side endpoint, for example, if you’re using server-side Google Tag Manager. You can find the list of various parameters that are supported here.
Next up is shared event settings. Suppose you’d like to distribute certain details among various events, like a changed page URL. In that case, you can input these specifics within this particular section.
Set Up Event Tracking in Google Tag Manager
Let’s review how we should set up event tracking in Google Tag Manager now, for example, a link click event tag.
In the new tag configuration, we’ll choose the familiar GA4 event tag we’ve used before. However, this part has changed slightly.
In the past, we selected the configuration tag, but now we will input the measurement ID.
We need to use the same measurement ID as we did in the Google Tag above.
If you’ve forgotten it, don’t worry. You can retrieve it. Visit your Google Analytics admin, click on data streams, then your data stream, and copy the measurement ID.
Alternatively, there’s another approach that we usually use.
Given that you may have multiple Google Analytics 4 event tags — manually entering the measurement ID each time can be quite inconvenient. That’s why we recommend using a variable specifically for the measurement ID.
How do we do this?
- Let’s click the plus sign.
- Create a new variable.
- Choose variable configuration and select constant.
- Paste the measurement ID, give this variable a name, and save.
- The interface of trigger settings is not changed. So, we can use the same logic as we used before.
🚨 Note: If you’re new to it, check out our handy guide on event tracking with GA4 and GTM.
- Then, we should add the name to the tag. Let’s add some additional parameters to the tag like clicking the text and clicking the URL.
A very convenient parameter marking function has appeared in the interface. If the parameter is supported by Google Analytics, you will see a checkmark. However, if you add some custom parameters, there will be no checkmark.
- Add values and save the tag.
What’s New in Variables Settings?
The official documentation says that now we can reuse common configuration and event parameters by setting up configuration and event variables.
The New Google Tag Event Settings Variable in Google Tag Manager
If we need to apply a new parameter to automatically track events, and we want to apply it to all other events, we can include it in the event settings variable.
- Go to the variables.
- Click New in the user-defined variable section.
- Click variable configuration, and find the Google Tag event settings.
Let’s imagine that we need to extract the custom parameter of the postcode that is available in the data layers and use it for all our event tags inside the container.
- Add here the necessary event parameters you want to reuse.
- Then, add a value of adding a new variable that will extract the data from the data layer.
- Name variables and event settings tag, and click save.
Let’s now add our created settings to our Google Tag and Event tags.
- First, open our Google Tag, click shared event settings, and then select the GA4 event settings.
If you want to display these parameters along with all GA4 events, we need to add it to the event tags as well.
- Click on the previously created event tag and add it to the event parameters section.
- Don’t forget to test and publish the container after all changes.
These new updates resolve the pains of a single-page application, where the Google Analytics 4 configuration tag didn’t refire when the visitor navigated to a new page without a full browser reload, and as a result, caused it to retain the initial custom event parameters value.
Previously, it required manual configuration of parameters in every event tag to work around the issue.
The main benefit of this update is that if you want to add some new custom parameters to all your tags in the future, you will not have to repeat manual actions for all tags. You just need to go to variables and add this parameter to the already created Event Settings variable.
The New Google Tag Configuration Settings Variable
There’s also another settings variable specifically for configuration, which can be used in the Google Tag, not the event tag.
While it allows for streamlined configuration across multiple tags, it’s most useful for businesses with multiple Google Tags in their container.
Smaller companies with a single Google Tag may find it more convenient to manually configure settings directly in the tag itself, as creating a variable for just one tag is unnecessary.
The process of setting up variables will be the same as we described previously.
Upon reviewing Google’s documentation, it’s evident that Google suggests using custom dimensions and parameters like coupons, items, search terms, or shipping tiers within the event settings variable.
Conversely, the configuration settings variable is intended for broader settings such as campaign source and cookie configurations.
However, through various experiments, we have observed that setting a custom parameter, essentially a custom dimension, in both the configuration and event tags, yielded identical outcomes. The parameter was effectively transmitted to Google Analytics 4.
We are also investigating these new changes, so subscribe to our blog in order not to miss the new insights of using GTM and GA4 as we are ready to share with you.
Have you gotten around to testing the new features yet? Let us know in the comments below.