How to fix Google Tag Manager not loading error: ERR_ABORTED 404

We feel you. You’ve created a new Google Tag Manager container, your developers installed it but after a while they tell you that the script returns a ERR_ABORTED 404 error.

Or even worse. You have your container installed on your site for quite some time and deploy tags on a regular basis but all of a sudden, the GTM container is no longer loading and you are getting the same 404 error.

If you are experiencing these issues than you are in luck as in this post, our Google Tag Manager experts shared their knowledge on why these things happen and what you can do to fix them.

Why it happens

Most of the times, this error results from your Google Tag Manager container being empty or un-published.

This is the expected behavior when you create your GTM container for the first time as by default, it has no tags, triggers or variables published so Google servers return a 404 error which shows as GET https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXXX net::ERR_ABORTED 404 in browser console.

Google Tag Manager net::ERR_ABORTED 404 error

Or, if you are using Tag Assistant browser extension, you would see the “HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or un-published container” error.

HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or un-published container

In a minority of cases, this error is caused by a stale version of Google Tag Manager’s preview mode.

In this case, the container already contains tags and triggers and the preview mode is already enabled but for some reason, that version of preview mode expired.

How to fix it

For the first case, fixing the 404 error is as simple as publishing your GTM container, by clicking on the “Submit” button from top right corner. This will create a new version of the container and the 404 error will disappear.

submit gtm container

When creating a new Google Tag Manager container, make sure you publish it otherwise it will return a 404 error Click To Tweet

For the second case, when you already have tags and triggers published and the 404 error is caused by a stale version of Google Tag Manager’s preview mode, the solution is to leave the current preview mode and enter it again.

Preview mode in GTM

By doing so you will create a new version of the preview mode and GTM with preview and debug console would load again on your site (without the 404 error).

Extra tip: How to fix preview mode not loading

Although not related to the Google Tag Manager not loading 404 error, if you have the preview mode enabled but the preview and debug console is not loading on your site, then it may be that you need to allow third-party cookies in your browser.

To do so, if you are using Chorme, from Settings, under the “Privacy and security” section, click “Site settings” and then go to “Cookies and site data”. In there, disable the “Block third-party cookies” option.

Disable block third party cookies in Chrome

For other browsers, you may check this guide on how to enable third-party cookies.

Once your browser accepts third party cookies, you can go back to your site and refresh the page as the preview and debug console should appear.

Conclusion

The main takeaway from this article is that if you create a new container, make sure that you publish the first version (even if it is empty) before you install it on the site.

Or if you have the preview mode enabled in a container which is already published but returns a 404 error, exit it and re-enable the preview mode.

And make sure that your browser is not blocking third-party cookies.

If you still have some questions on the 404 errors or Google Tag Manager’s preview and debug console, feel free to post a comment below or request a Google Tag Manager audit from our experts.

2 Comments Leave a reply


Leave a Reply

Thanks for choosing to leave a comment. Please keep in mind that comments are moderated and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.