Solving the Google Tag Manager 404 Error Message

Google Tag Manager is top of the heap and still growing in popularity as a tag management solution, and there’s no reason why it shouldn’t be, given its ease of use, clean interface, and shall we say tempting retail price of $0.00. Despite the reservations I always feel when I find myself becoming dependent on a new Google product, I’ve quite liked the experience of using it, and one of the great strengths of that experience is how marvelously not buggy the platform is. Google Analytics, by contrast, has probably thwarted me with 20 or more crazy inexplicable bugs in my seven years’ experience using it (their issue tracker lists the total number of issues tracked as “many”), but GTM hasn’t even let one come to the surface that I’ve been aware of, and I’m not exactly new to GTM either at this point. The other day, however, our fearless leader brought to my attention something that sort of qualifies as a bug, and given that 1) lots of people are finding it frustrating, 2) I completely understand why, and 3) the fix is dead simple but also completely counterintuitive, I thought it would be worth taking a few minutes to outline a solution.

I’m talking about the error message that shows in the Chrome console or in Google Tag Assistant when you’ve placed code for a new container on a site, but have yet to publish the container. In the console, it reads: “Failed to load resource: the server responded with a status of 404”, and it looks like this:

In Google Tag Assistant, the message reads: “HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or un-published container”, and it looks like this:

First, let’s talk about what this error message actually means and how to fix it. That’s the important bit. Then we can talk about precisely why the message is so infuriating.

To make this error message go away, you need to publish your container, even if it’s empty. That’s it. That’s all you have to do. Hop over to your GTM dashboard and hit “Submit” in the top right corner, then see that process through. You’re done. Go back to the console or Tag Assistant and see for yourself:

I imagine most readers are going to check out here, and that’s fine; that’s why I put the useful stuff at the top. Thanks for reading and good luck with your GTM adventures, present and future.

Now, for the pleasure of other readers who enjoy ranting about Google as much as I do, let’s seethe a bit about how godawfully unhelpful and counterproductive this message is.

In fairness, this is not a “bug” in the classic sense, because although it indicates that there’s a problem with the install, there turns out not to be. The flaw is not in the software, but in the indicator. And it’s also not an outright false positive, suggesting the presence of a problem when in reality there is absolutely nothing you need to do. In this case, there is something you need to do. But the thing that you need to do is 1) simply a step in the process that you haven’t gotten to yet, but absolutely would have gotten to eventually, and 2) a step that you would never think to take as the very next one, because it doesn’t make intuitive sense to publish an empty container. But instead of packaging this critical information in some kind of helpful or at least accessible way in the validation tools’ messages, Google uses the language of “failure” and “error”, and deploys the classic red and yellow warning colors, setting off alarm bells pointlessly.

There isn’t anything wrong with your install; all you had to do was paste one code snippet in the <head> and another in the <body>, and you did that. It’s hard to do that wrong. But this error message almost seems determined to make you doubt yourself and go hunting for a problem that isn’t there. And in cases where the installation was performed by a dev for whom that was their only job related to Google Tag Manager, and who might not even have access to the dashboard, the appearance of an error message like this is going to cut particularly deep, and will provide absolutely no path to resolution.

Moreover, instead of working to prevent this confusion in the first place by explaining somewhere in the GTM literature that if you want Google’s own validation tools to recognize the integrity of your install, you need to publish your container immediately — even if it’s empty — GTM instead presents this message in dashboards for new containers:

“Add tags and publish” strongly implies “add tags before you publish”, which in turn suggests there would never be any good reason to publish a container that hasn’t had any tags added to it yet. So even if you’re not a dev — even if you’re someone on the marketing team who has front-end access and intends to be the primary user of the GTM platform once it’s up and running — there’s nowhere you can look in the dashboard to find the solution. If this had ever happened to me, I can promise you it would have sparked hours/days of torment, to the tune of “I really want to get started using GTM, but I can’t get the damned install right, and there’s no way I’m going to start composing tags until I’ve fixed that!”

So the good news is that this so-called error is easy to fix and doesn’t represent a threat to your GTM install or data collection; the bad news is that encountering the error message is a frustrating, confusing experience that threatens to derail installation after its very first step, and that could easily have been avoided by Google taking a tiny bit of extra care in their messaging and documentation. It’s their world, but we’re the ones who have to live in it!

Written by
Driven by a deep fascination with the philosophical and cultural implications of search, Will has applied his skills to improve visibility, traffic, and conversions for hundreds of sites in his 10+ years in SEO and analytics.

Related Posts

Leave a Reply

Your email address will not be published.