When Google released their "gtag.js" version of their products, they made some significant changes to the way their scripts load on the page and how those scripts are triggered. Below, is a guide to the changes made for each Google product and how those changes are integrated within our GTAG versions of those tags.
When Google switched over to their GTAG format, they made some significant changes to address performance and browser changes. With the advent of ITP 2.0, browsers started to block third-party cookies, which Google previously relied on to maintain their tracking. With these cookies now blocked, Google switched to a first-party cookie approach in the GTAG format. By upgrading to GTAG for all of your Google products, you're ensuring that tracking is captured by browsers that block third-party cookies.
Since GTAG is Google's current platform, you can ensure that you'll be receiving all of Google's latest code by upgrading your tags to use their current platform.
Google also made some script format changes, which have resulted in bundling their scripts together. This allows a single script to load (instead of multiple), which reduces the number of network requests leaving your site and increases site performance.
In the move to their GTAG version, Google consolidated the way their scripts are loaded to the page. Instead of each script loading individually for each product, they now load a single "gtag.js" file which includes references to the scripts that were originally loading for each product. By bundling these scripts together, Google is reducing the number of network requests being sent on the page, which increases performance for your site. With this change, Google is now asking that a single "Global Site Tag" be added to every page where a Google product is being utilized.
To meet this request, when loading, our templates check the page for any other GTAG tags that might have already loaded on the page. If the GTAG script has already loaded, the tag moves on with the code. This ensures that the GTAG script only loads once per page, regardless of the number of GTAG tags or products being loaded. For example, if Analytics is running on every page and is the first GTAG tag to load, that tag will generate the global tag. DoubleClick (which, in this example, is set to run only on certain pages) will then use the global snippet generated by the Analytics tag to send the DoubleClick event. The Global tag essentially loads the GTAG library on the page for all Google tags to use.
The initialization of the tag (using the Account ID) is handled within the tag - using
gtag(‘config’, ‘AW-XXX’) - and is not added to the script tag generated for the Global tag.
Do not implement the GTAG Global Tag outside of Tealium Marketplace GTAG tags. Only use the Floodlight, AdWords or Analytics GTAG Marketplace Tags.
Implementing this Global snippet outside of these tags or within extensions can disrupt the code generating the snippet from the tag templates, and therefore cause the tags to break.
Helpful articles from Google
Use the global site tag
When Google released their "gtag.js" version of Google Analytics, they made some significant changes to the way their scripts are triggered. Some of the features present in "analytics.js" were removed in the "gtag.js" version or altered so that they track in a slightly different manner.
Many of the parameters that had previously been sent to the "analytics.js" script were changed to a different format in the "gtag.js" script. These changes are reflected in the "gtag.js" version of our tag. However, this means that mappings cannot be migrated directly from the existing tag to the new tag, since the parameters could be different. We recommend manually transferring the mappings one by one using the parameters available in the mappings box instead of copying the parameter names from the existing tag. See the charts below for a list of the parameters that have changed between tag formats.
With the "analytics.js" version, data was sent to trackers, which then sent their data on to Google. Multiple trackers could be used in the previous format. With the update, the GTAG format now uses a "universal" ID (also referred to as a "property" ID) to send data to Google. You can load multiple IDs to a page and data is then targeted to the specific ID with which it was configured. Trackers do not need to be migrated to the GTAG format.
The parameter used for cross-domain tracking in the GTAG format has been renamed to “linker” instead of “allowLinker”. This is something to note if you are not using the config settings and need to migrating mappings.
Product Action List
In the "analytics.js" version, the "Product Action List" parameter was sent with all enhanced e-commerce events. In the GTAG format, it is only sent with "select_content" and "view_item" events. It's recommended to test this report when upgrading to the GTAG format to ensure that the report is still reporting accurately.
Social Tracking has been discontinued in the GTAG format.
Helpful Articles from Google
Previously, Google AdWords had two tags - remarketing and conversions. With the new GTAG format, both tags have been combined into a single tag. If a conversion label is not present in the tag, a remarketing hit will be sent. If the conversion label is present, a conversion will be sent.
Helpful Articles from Google
Google Ads: Set up conversion tracking for your website
Floodlight tags had significant changes made to the format and naming of the parameters sent with these tags. It can be confusing to upgrade these tags to the GTAG format, however, they should work the same as in the previous tag format.
The Advertiser IDs now have "DC-" prepended to the ID number. (ex: DC-XXXXXX instead of XXXXXX). These can easily be transferred from the old format to the new format by simply adding the "DC-" prefix to the existing ID number.
Previously, the tag configuration consisted of a "source", "type", and "category" which were easily found in the tag code. These configuration parameters have been given new names in the GTAG format. When looking at a new GTAG code snippet generated by DoubleClick, you'll see a "send_to" line as follows:
This translates to:
send_to = advertiser_id / activity_group / activity + counting_method
The previous format's names/values can be transferred to the GTAG format using the following:
source = advertiser ID
type = activity group
category = activity
In the old tag format, if the three required parameters were present when the tag loaded, the tag would send to Google without any issues. This has been changed in the GTAG format of our tag.
An event must be present or the tag will not fire.
We recommend setting a variable and mapping it to trigger either a "conversion" or "purchase" event when you want your tag to fire. These events will not trigger on a simple page load and need to be triggered by the tag. There is an option in the tag configuration to "Auto Fire Purchase Event". This will automatically trigger a "Purchase" event if an "order_id" is present in the e-commerce extension when it is enabled.
Some of the parameters have also changed for the DoubleClick Floodlight tags. Here is a table with how they have changed in GTAG format. Also note that in our tags, the “u” values will need to be re-mapped, as those have been updated as well:
Counting methods are new with the GTAG format. If you're unsure of a counting method to use when upgrading to the GTAG format, you can use "standard". Also note, if you are using the "Per Session" counting method, you will be required to map a value to the "session_id" parameter for the tag the send.
Helpful Articles from Google
Migrate your Floodlight implementation to the global site tag
Where do I add the global tag?
The global tag is generated by our GTAG templates and does not need to be added anywhere in Tealium. Only the event snippets need to be added using the GTAG tags from the Marketplace.
Why don’t we use a global tag for each product (ie: DoubleClick, AdWords, Analytics)?
Google specifies that when combining multiple products, only ONE <script> tag needs to be added to the page, even though there are multiple config calls.
Will DoubleClick send if only AdWords is showing up in the global tag?
Google mentions that the <script> tag only needs ONE ID in the SRC attribute, even though there are multiple config calls being sent. The config calls are contained inside our templates and will not display in the <script> tag.
I transferred all of my old DoubleClick tags to the new GTAG format, but my tag isn’t firing. What’s wrong?
If you simply moved the values from the old tag to the new tag, you’ll need to generate an event to send a conversion. This happened if the tag loaded on the page before, but with GTAG it's now triggered manually. See the DoubleClick Floodlight instructions for information on how to send a conversion event.