I have added the gtag like following

<!-- Global site tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-189297876-1"></script> <script>   window.dataLayer = window.dataLayer || [];   function gtag(){dataLayer.push(arguments);}   gtag('js', new Date());   gtag('config', 'UA-xxxxxxxxx-x');   gtag('config', 'G-xxxxxxxxxx');   gtag('config', 'AW-xxxxxxxxx'); </script> 

Here I use the Google Analytics, the AdWords Conversion and the Global-ID.

When I check it with the Google Tag Assistant Plugin of Chrome, I get

I don't know, if this is a problem (the Message "Multiple installations of Global site tag (gtag.js) detected"). Is it only there one time.

Tag:google-ads-api, google-analytics, gtag.js

2 comments.

  1. Michele Pisani

    If your website is SPA (Single Page Application) it is a normal (known) behavior of the extension.

  2. efirvida

    When you add the Google Ads key to your gtag.js configuration

    gtag('config', 'AW-xxxxxxxxxx');

    it automatically adds a new tag to your DOM like:

    <script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXX&amp;l=dataLayer&amp;cx=c"></script>

    I'd know why but it is. I found it with trial and error ;)

Add a new comment.