How do we use a single gtag for multiple Google products?

Bronze Contributor
Bronze Contributor

Hi,

A major feature of Google's gtag is the ability to combine tagging for all your different Google platforms into one tag. The documentation on that is here. I am curious how to best handle this using Tealium.

We use Google Analytics, multiple Google Ads accounts and a Floodlight tag. I know that there are gtag tags in the marketplace for each of these individually, but how can I combine multiple account id's into a single tag like the below so we only have it firing once?

gtag('config', 'GA-TRACKING_ID');
gtag('config', 'AW-CONVERSION_ID');

 

Would it work to to simply pick the analytics gtag and stick the other account numbers in it like the below?
tags.png

Additionally, how would we handle mapping variables to each of these tags for conversion events? I know that gtag offers a grouping functionality and 'send_to' for specific accounts, how should we handle this in Tealium?

 

I appreciate any help you can offer.

12 REPLIES 12

How do we use a single gtag for multiple Google products?

Bronze Contributor
Bronze Contributor

Hi @holmesp,

thanks for raising this question! We just stumpled upon the same problem. I see that you have the option to add several advertiser IDs in the floodlight gtag template in Tealium, but not sure if this works as well for AW IDs.

Unbenannt.PNG

We did not test this yet.

The easiest would probably be to use a custom tag but I would be interested in the recommended solution from Tealium.

How do we use a single gtag for multiple Google products?

Gold Contributor
Gold Contributor

In addition to GA, Floodlight and Adwords, I also want to understand how to add the Hotel Ads partner ID.

For others, it is as simple as adding the multiple IDs separated by comma. But for Hotel Ads, it is suppose to use a different cookie and the config code for the same is-

  gtag('config', 'HA-PARTNER_ID', { 'conversion_cookie_prefix' : '_ha'});

How can we add the "conversion_cookie_prefix part"?

ksugam

How do we use a single gtag for multiple Google products?

Tealium Employee

@ksugam

Answering the last question first:

Cookie prefix. 

try a javascript extension scoped to the adwords tag with ;

 

u.data.config =  { 'conversion_cookie_prefix' : '_ha'};

Should look like :

 

Tealium iQ - Tag Management 2018-10-16 16-08-21.png

 

 

How do we use a single gtag for multiple Google products?

Tealium Employee

@lkehl

thanks for raising this question! We just stumpled upon the same problem. I see that you have the option to add several advertiser IDs in the floodlight gtag template in Tealium, but not sure if this works as well for AW IDs.

Quick answer is No the 'Google Ads tag will not'.  If you have multiple adwords id's loading on one site then you will have multiple adwords tags.  Each tag is coded to coordinate with each other on what is initialized so it will end up as if they were 'one tag'.

But, you could customized the template if you choose to work in the same manner as the floodlight tag.   The marketplace floodlight tag splits the list of floodlight id's by the comma and puts them into an array, then increments through the array of id's.  I would reccomend you avoid the additional effort and maintenance by using multiples of the adwords tag, one for each adwords id. 

combine tagging for all your different Google platforms into one tag?

@holmesp

Our gtag tags are coordinated in mutiple tags for each type.  The code is created so that in the end it will be the same as if it was implemented in one tag.   ( the marketplace tags will check to see if a previous gtag has loaded and if so it will only set the config or events for that tag and ID(s) . )

Robert

How do we use a single gtag for multiple Google products?

Gold Contributor
Gold Contributor

thanks @robert_sabec. I will try the extension solution and see if that works. 

Speaking of multiple gtag tags implementation, I had implemented Adwords gtag and when I implemented floodlight gtag, the call for floodlight did not fire. I read in some other thread about race condition with 2 gtags. Can somebody confirm that 2 gtags work perfectly fine on their accounts?

I deactivated the first gtag and then the second gtag worked perfectly fine.

ksugam

How do we use a single gtag for multiple Google products?

Tealium Employee

@ksugam

Please update your templates to the current versions and re-test.   I do not show that issue outstanding.

Robert

How do we use a single gtag for multiple Google products?

Gold Contributor
Gold Contributor

@robert_sabec I dropped the tag template and re published. When I did the Tag Status Checker, it still continues to show the Version as "old". Any reason why it is not fetching the latest version?

ksugam

How do we use a single gtag for multiple Google products?

Gold Contributor
Gold Contributor

@robert_sabec There seems to be an issue with the Tag Status Checker module. Tealium Support team is looking into this issue for me. Thanks!

ksugam

How do we use a single gtag for multiple Google products?

Bronze Contributor
Bronze Contributor

Hi @ksugam really helpful thread here. Did you manage to get the two global tags firing in harmony?

Cheers,

Ben

How do we use a single gtag for multiple Google products?

Gold Contributor
Gold Contributor

Hello @ben_southwell- Post the tag template update that happened with Tealium support (as the standard process of dropping template and publishing to get latest version failed due to some technical issues), multiple gtags worked as expected without running into RACE condition.

ksugam

How do we use a single gtag for multiple Google products?

Bronze Contributor
Bronze Contributor

Thanks for your help. I'll let you know when we get this working.

Cheers,

Ben

How do we use a single gtag for multiple Google products?

Bronze Contributor
Bronze Contributor

--- Ah - ignore the below -- Just realised it's the initial gtag script loaded that makes the additional network calls. 

 

@robert_sabec 

One of things i noticed in this instance is that the tags stil call multiple instances of gtag.js 

So if i have 2 Adwords Conversion Ids and set them up as individual tags, i get 2 network calls for the gtag.js script. 

This is in addition to the analytics call. 

Is this correct? 

I would have thought a flag between them would ensure only one gtag instance is loaded. 

cc: @corbinspicer 

Public