Reply
Highlighted
Visitor
Posts: 2
Registered: ‎05-24-2018

How do we use a single gtag

Hi,

Is there a way of implementing a gtag? I am not able to find any articles related to it.

Thanks,

Nidhi

Frequent Visitor
Posts: 3
Registered: ‎08-08-2017

Re: How do we use a single gtag

[ Edited ]

Assuming you're asking about the latest Floodlight and Adwords gtag.js configuration as recommended by Google: 
https://support.google.com/searchads/answer/7563117?hl=en&vid=0-168058072095-1540175155034

The latest versions of the Floodlight and Adwords tags in the TiQ Tag Marketplace use the gtag.js deployment. 

Note: the u.hastagjs function in the Floodlight and Adwords tag templates will check and only load a single gtag.js from googletagmanager.com, but multiple Floodlight and Adwords tag deployments are supported in Tealium - this is a nice feature of these tags so that gtag.js is only requested once per page.  

u.hasgtagjs = function() {
            window.gtagRename = window.gtagRename || "" || "gtag";
            if (utag.ut.gtagScriptRequested) {
                return true;
            }
            var i, s = document.getElementsByTagName("script");
            for (i = 0; i < s.length; i++) {
                if (s[i].src && s[i].src.indexOf("gtag/js") >= 0) {
                    return true;
                }
            }
            window.dataLayer = window.dataLayer || [];
            if (typeof window[window.gtagRename] !== "function") {
                window[window.gtagRename] = function() {
                    dataLayer.push(arguments);
                }
                ;
                window[window.gtagRename]("js", new Date());
            }
            return false;
        }

 

Reply
0 Kudos
Visitor
Posts: 2
Registered: ‎05-24-2018

Re: How do we use a single gtag

Hi,

Thank you for the solution.

But I am also looking for the Gtag Analytics code. Currently all my tags and extensions are based on universal Google Analytics. So to implement Gtag Adwords and Floodlight tags I believe first I have to migrate all my Google Analytics Tags to Gtag.

Really appreciate if you have a solution to it!!

Thanks,
Nidhi
Reply
0 Kudos
Visitor
Posts: 27
Registered: ‎09-18-2017

Re: How do we use a single gtag

HI Folks Can someone from Tealium please clarfiy this. I'm currently undertaking some work to migrate over toe gtag for GA. Will this work in tandem with the adwords gtag? kr
Reply
0 Kudos
Visitor
Posts: 27
Registered: ‎09-18-2017

Re: How do we use a single gtag

HI Folks Can someone from Tealium please clarfiy this. I'm currently undertaking some work to migrate over toe gtag for GA. Will this work in tandem with the adwords gtag? kr

Reply
0 Kudos