Google Tag Manager being loaded multiple times

Viewed 1744

I have this configuration for Google Analytics wherein I load 2 products in the site's header as such:

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-xxxx-x');
  gtag('config', 'AW-xxxxxxxx');
</script>

On the same page below the header, the following call is made to track conversions on load:

<script>
  gtag('event', 'conversion', {'send_to': 'AW-xxxxxxxx/xxxxxxx'});
</script>

This results in gtag being loaded/initiated twice:

GA Calls The Google Tag Assistant Chrome plugin has the following complaint: "Multiple installations of Global site tag (gtag.js) detected", and links me to a Google help page that resolves in a 404.

When I remove the conversion event, gtag only loads once, as it should.

Is my implementation wrong/incorrect?

1 Answers

Check if you are not actually submitting 2 pageviews, otherwise it may be a bug in the add-on that does not have any negative effect.

Related