May 12, 2017
Google Analytics Settings Variable in Google Tag Manager
This week, the team behind Google Tag Manager rolled out a new (and awesome) GTM feature – Google Analytics settings variable which makes Universal Analytics tag management much easier. In this blog post, I’ll explain what it does, what problems does it solve and how it will make your life easier.
My story with Google Tag Manager begins with the idea of managing Google Analytics tracking codes much easier. I bet yours too, right? Facebook pixels, Twitter pixels, etc. were always in 2nd place.
One of the biggest problems with Universal Analytics has been how to manage a larger number of different GA tags within one container. Once you have dozens of tags that have some settings configured in a specific way (e.g. cross-domain tracking), it becomes really frustrating to update each one of them when you want to make a change to one of these generic settings.
But now that problem is long gone, thanks to new Google Analytics Settings variable.
This variable acts as a central location to configure sets of Google Analytics settings for use across multiple tags.
Instead of having to enter your Google Analytics settings over and over again in each new Universal Analytics tag, you’ll simply be able to select (or create) a Google Analytics Settings Variable to apply to multiple tags:
The variable contains the fields you’ll find under “More Settings” of Universal Analytics tags, combined with some set fields that are necessary to include in all tags anyway (e.g. Tracking ID).
Where can I find this new variable?
The new user-defined variable is waiting for you in the variable creation menu, Utilities section.
If you can’t see it, don’t worry. Rolling out a new feature takes time and it will appear any time soon in your Google Tag Manager account.
All fields in this variable are optional, except Universal Analytics Tracking ID (UA-XXXXXX-X). If you click More Settings, you’ll see all the fields available for configuration.
Add Google Analytics settings variable to Universal Analytics tag
To add this centralized Google Analytics settings variable to UA tags, click the drop-down under the heading Google Analytics Settings that instructs you to select a variable from the list.
Don’t worry, you can still configure the Advanced Settings individually for this tag, but with one centralized variable this becomes unnecessary in many cases. Please keep in mind, that you’ll still need to add individual triggers to this tag.
Google Analytics Settings variable is for UA settings only, such as Enable advertising features, cookieDomain, cross-domain-tracking-related settings, etc., not triggers.
Google Analytics settings variable offers you three ways to create and manage Universal Analytics tags:
- You can reuse all settings from the Google Analytics Settings variable.
- Don’t use a Google Analytics Settings variable at all, and set all settings manually (within UA tag), instead.
- Use a combination of both: set the fields with a Google Analytics Settings variable, and then override some fields with custom values within Universal Analytics tag.
The first way. When you apply the variable and save the tag, all Google Analytics settings are fetched from the GA settings variable. This is the most light-weight and straightforward way to implement the variable.
The second way can be chosen ticking Enable overriding settings in this tag checkbox (in your Universal Analytics tag). By doing so, you’ll completely ignore any Google Analytics Settings variables and just configure the tag independently for particular tag only.
The third way is a mix of aforementioned two methods. This is useful if you want the benefit of the GA settings variable, but you want to make some adjustments for this tag in particular.
Here is a couple ideas of how you can use Google Analytics settings variable (but remember, sky’s the limit).
Cross-domain tracking. If you website/store/etc. spans across different domains, then you had to set the following settings with each Universal Analytics tag, such as Allow Linker: true, Auto Link Domains: example.com.
Now, there’s one variable to rule them all.
Enhanced ecommerce. If you have ever implemented Google Analytics Enhanced Ecommerce (EE) tracking via GTM, you already know that every interactions needs to be passed via Universal Analytics tag and every tag must have Enable EE Features checkbox enabled. From now on, this can be achieved with one centralized GA settings variable.
I am simply in love with this feature. What a great time saver! I remember the nightmare when I had to switch Universal Analytics tags to cross-domain tracking. Yuck! Doing the same actions over and over again for 100 times were driving me crazy.
Thank you, GTM team, for releasing this major update.
Want to learn more about Google Analytics Settings variable within Google Tag Manager? Watch the video below or visit Google’s help center: