The GTM.JS 404 Error

Get compliant today in the European Union, United States, Canada, United Kingdom, Australia, Brazil & South Africa with the only Privacy Suite for WordPress that offers a fully-featured plugin for Worldwide Compliance.

You’ve added GTM to the Complianz Wizard and still you’re receiving a 404 GTM.JS Error in Google Tag Manager. We know the issue and we have a solution for this issue.

The solution to GTM.JS 404 Error

The solution is one of GTM itself. What is actually happening is that your browser is requesting data from GTM. However, the container hasn’t been published yet. This means into no data that is being returned. There is one simple solution to this: Publish the GTM container once you create it.

How do you do this?

Always follow these steps when you plan tracking a new website for GTM:

  • Create new container
  • Publish it!
  • Put the GTM embed code in your website code
  • Open the JavaScript Console when browsing on your website
  • No gtm.js 404 error? Then there’s no error and you’re good to go.

Master tip: Always publish your containers, even when they’re empty. By doing this developers won’t receive a 404 error.

Recent articles

Integration with Woodmart Google Maps

An integration with the WoodMart theme is available as an MU Plugin on GitHub: https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/woodmart-custom-google-maps.php

Read More »

Download

You can also directly download the demo container with triggers and variables/ Please make sure you know how to import a container.

Menu

Google Consent Mode

You can now enable Google Consent Mode for Tag Manager. How it works, and what you need to configure can be found here.

Client Demo

We have a client demo where we have prepared custom events and the most common tags. If you want access for inspiration, please contact support. You will need a Google Account to get access.

Other articles

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!