Let’s face it – most of us use Google Tag Supervisor for one primary function: to deploy and configure Google Analytics monitoring on a web site. I’d wager that when you begin utilizing GTM, you gained’t be implementing Common Analytics the old school manner, with on-page code, any extra. However operating Common Analytics tags by way of GTM isn’t but an ideal workflow. We’re nonetheless lacking issues like correct plugin assist and the choice to correctly differentiate between the tracker and the hit – each of that are straightforward to do with an on-page implementation.
For me, and I’m positive for a lot of others, one of many largest issues with Common Analytics has been how one can handle scale. After getting dozens of tags which have some settings configured in a particular manner, e.g. cross-domain monitoring settings or customized web page paths, it turns into a nightmare to replace each one whenever you wish to make a change to considered one of these generic settings. Nicely, it’s been a very long time coming, however Google Tag Supervisor simply launched a function to assist us with this: the Google Analytics Settings variable.
The variable accommodates the fields you’ll discover beneath “Extra Settings” of Common Analytics tags, mixed with some set fields which are (usually) completely essential to incorporate in all tags anyway (Monitoring ID and cookieDomain
, particularly). The arrival of this new variable sort provides you three methods to create and handle Common Analytics tags:
-
Copy all settings from the Google Analytics Settings variable.
-
Don’t use a Google Analytics Settings variable in any respect, and as an alternative set all fields manually.
-
Use a mix of each: set the fields with a Google Analytics Settings variable, after which overwrite among the fields with customized values on a tag-by-tag foundation.
This provides you a lot of flexibility to work with.
The Google Analytics Settings variable is obtainable in your internet containers in addition to your cell Firebase containers.
X
The Simmer E-newsletter
Subscribe to the Simmer e-newsletter to get the most recent information and content material from Simo Ahava into your electronic mail inbox!
The Google Analytics Settings variable
You will discover the brand new variable within the variable creation menu that pops open whenever you begin constructing a brand new Consumer-Outlined Variable.
The very first thing you’ll discover is that the Cookie Area discipline is auto-populated with the worth auto
. This is a superb change, and removes one of many key variations between the really helpful analytics.js monitoring code (which has auto
because the default worth for cookieDomain
) and the default Common Analytics tag template in Google Tag Supervisor (which doesn’t have a cookieDomain
worth set in any respect).
Be aware that the Monitoring ID discipline is required, so add your Common Analytics property monitoring ID or a variable you’ve used earlier than to it earlier than saving the brand new variable.
In case you click on Extra Settings you’ll discover all of the fields obtainable for configuration in Common Analytics tag templates. You may set these as you would like, remembering that they are going to be utilized to all tags that use this variable.
Be aware that apparent conflicts are resolved mechanically. In case you Allow Enhanced Ecommerce Options in your Google Analytics Settings variable, after which add this variable to a Timing sort Common Analytics tag, the Timing tag gained’t magically flip into an Enhanced Ecommerce enabled tag. Since Enhanced Ecommerce hits can solely be despatched with Web page View and Occasion tags, this specific setting is just ignored in incompatible tag varieties.
So as to add your settings to tags, you’ll discover a new drop-down beneath the heading Google Analytics Settings that instructs you to pick out a variable from the listing. You may also begin a brand new variable creation workflow from this menu.
As you may see, you may nonetheless configure the Superior Settings individually for this tag. That’s as a result of Superior Settings don’t have anything to do with Google Analytics – all tags in Google Tag Supervisor have these identical Superior Settings fields.
You’ll nonetheless want so as to add particular person triggers to this tag. Once more, triggers should not particular to Common Analytics tags. The Google Analytics Settings variable solely conflates all Google Analytics settings right into a single variable configuration.
As I discussed within the introduction of this text, there are 3 ways to implement a Google Analytics Settings variable in your Common Analytics tags. The primary one is within the screenshot above. Once you apply the variable and save the tag, all Google Analytics settings are derived from the variable. That is positively probably the most lightweight and simple method to implement the variable.
The second manner is to disregard the variable utterly, and simply create a person, one-off tag. On this case, you want to do two issues:
-
Go away Choose Settings Variable… as the worth of the drop-down.
-
Verify the field subsequent to Allow overriding settings on this tag.
When you do these two issues, you’ll utterly ignore any Google Analytics Settings variables and simply configure the tag independently. A really helpful factor to nonetheless have, particularly if you wish to do some fast prototyping.
The third method to implement the settings variable is a mix of the 2 strategies above. That is helpful if you would like the good thing about the settings, however you wish to make some changes for this tag specifically. For instance, I’d wish to use my “GA Settings – Enhanced Ecommerce” settings in my Add To Cart occasion tag, in order that it makes use of all of the settings I’ve configured for my Enhanced Ecommerce tags. However I wish to make a small adjustment: I wish to use a Customized JavaScript Variable for the Enhanced Ecommerce payload as an alternative of dataLayer. That is what this modification would appear to be:
In case you use a Google Analytics Settings variable, all fields that you just set in that variable are inherited within the tag that makes use of the variable. You may all the time override the fields, however it could be troublesome to recollect simply which fields have been set.
For this conundrum, there’s a sensible UI workflow replace. See the little (I) icons within the screenshot above, marked with a yellow star? Once you click on that icon, an overlay opens with the variable in query so that you can overview and even edit! Now you can modify or edit variables mid-workflow, with out having to go away the tag settings to make changes.
That is, naturally, very important for the Google Analytics Settings variable as effectively, since you wish to watch out you’re not overriding fields that shouldn’t be overridden. It might be useful to see the precise modified values and settings inherited from the variable within the tag itself, however I assume there are technical limitations why this isn’t (but) potential.
Concepts to be used
Listed below are three sorts of Google Analytics Settings variables I exploit in my tasks.
1. Normal settings
That is the one I exploit as a generic settings variable in tags that haven’t any particular perform (e.g. common Web page View and Occasion tags).
These are fields I exploit in all my tags.
2. Cross-domain monitoring
If I’ve a rollup property to which I accumulate cross-domain monitoring knowledge, I’ve a Google Analytics Settings variable for that, too.
And in all my rollup tags, I’d have the settings from above. If I had rollup tags which have BOTH Enhanced Ecommerce and cross-domain necessities, I’d set them up with cross-domain monitoring settings after which manually add the Enhanced Ecommerce settings.
3. Enhanced Ecommerce settings
And eventually, I’ve a generic settings template for all Enhanced Ecommerce tags.
With this tag, I can setup easy Enhanced Ecommerce settings for all my EEC tags. In some particular instances, I can override these default settings with customized stuff.
Abstract
This can be a fairly clean function for managing your Common Analytics tags. I firmly consider it is a nice timesaver, as it can assist you keep away from typical knowledge high quality mishaps with misconfigured tags. With the Google Analytics Settings variable, it’s additionally straightforward to assist new customers turn into accustomed along with your knowledge assortment configuration. New customers, usually, are the weakest hyperlink for knowledge high quality, as they may not know all of the settings the Common Analytics tags in your group needs to be configured with.
If there’s one factor I’m lacking it’s variable chaining. I would really like to have the ability to use a Google Analytics Settings variable inside a Google Analytics Settings variable. Within the three examples of the earlier chapter, you may see that every one these settings variables share the identical Customized Dimensions. I want to specify that every one these three settings variable use one other settings variable as the bottom, after which merely add/modify all the mandatory settings. This manner I may create a hierarchy of settings variables, making it much more unlikely that misconfigured fields result in knowledge high quality points.
Naturally, chaining variables can result in points, too, so correct governance and customary sense would nonetheless rule.
Do you have got some “go-to” settings configurations in your tags, for which you possibly can leverage the brand new settings variable?