404 error for Google Tag Manager

GetGoogle Tag-Manager

Get Problem Overview


Google Tag Manager told me to put this underneath the opening body tag.

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<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=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->

Now I'm getting this 404 not found for GET:

GET http://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX

I implemented the code last night. Does this just take time or is this something that needs to be fixed? If the latter, how would I fix it?

Get Solutions


Solution 1 - Get

You need to publish a version of your container. If it is not published, the request will return a 404 error.

> To publish your current workspace: >

  1. Click Submit at the top right hand side of the screen. The Submit Changes screen will appear, with options to publish the container and save a version of your container.
  2. Select Publish and Create Version if it is not already selected.
  3. Review the Workspace Changes section to see if your configuration appears as you expect.
  4. Enter a Version Name and Version Description.
  5. If you have Tag Manager configured to use multiple environments, use the Publish to Environment section to select which environment you'd like to publish to.
  6. Click Publish.

Solution 2 - Get

I had the same issue even after publishing and got it fixed by simply deleting the subdomain "www" from the tag manager domain "https://googletagmanager.com" instead of "https://www.googletagmanager.com"

Seems the problem is that the DNS is blocking www. or the subdomain doesn't reroute properly to our region!

Solution 3 - Get

My issue was that had AdBlock enabled.

Solution 4 - Get

In my case it helped when I leave Preview and lunch it again. As I figured out my preview "outdated" somehow...

Solution 5 - Get

As of this writing, you don't need to publish the container to fix the Error 404 when you first create the container. You can just do a preview and the error 404 should be gone.

Solution 6 - Get

You must publish the container once you create it. It's doesn't matter the container is empty, just publish it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJ82View Question on Stackoverflow
Solution 1 - GetThorkil Holm-JacobsenView Answer on Stackoverflow
Solution 2 - GetKareemView Answer on Stackoverflow
Solution 3 - GetGraham P HeathView Answer on Stackoverflow
Solution 4 - GetEugeneView Answer on Stackoverflow
Solution 5 - GetJim.BView Answer on Stackoverflow
Solution 6 - GetHarshaView Answer on Stackoverflow