• Could you allow selfhosting of these types of scripts?

    <!-- Google Tag Manager -->
      <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    		new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    	  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    	  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    	})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
      <!-- End Google Tag Manager -->
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi @mattiasf,

    Sadly Google doesn’t allow self-hosting of gtm.js. Whenever you try to open the file directly, it’ll return a Bad Request.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    In addition: gtm.js updates every single time you publish a container or preview your container. So you’ll need to constantly update the local version if you want the setup to reflect what you have published / previewed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Selfhost gtm.js’ is closed to new replies.