How do we use a single gtag

Bronze Contributor
Bronze Contributor

Hi,

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

Thanks,

Nidhi

4 REPLIES 4

How do we use a single gtag

Bronze Contributor
Bronze Contributor

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;
        }

 

Robert Anderson

How do we use a single gtag

Bronze Contributor
Bronze Contributor
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

How do we use a single gtag

Tealium Expert
Tealium Expert
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
Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

How do we use a single gtag

Tealium Expert
Tealium Expert

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

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -
Public