Stape
Search
Try for free

Common Google Tag Manager errors and mistakes (+ solutions)

Updated
Jul 18, 2024
Published
Feb 11, 2022
Also available in

Collecting precise data is crucial for analyzing and improving online business presence, reaching users, and converting them into customers. Google Tag Manager (GTM) Server-Side tagging allows website owners to start tracking website visitors more efficiently, accurately, and securely.

We at Stape understand that getting your setup 100% correct can be challenging. This new method requires more technical knowledge than what was previously used with traditional web tracking, which may seem overwhelming at first glance.

That is why we’ve gathered here the most common Google Tag Manager errors and problems and tips on how to solve them. Once you've done this, you can take advantage of all the benefits of server-side tracking!

Server-side Google Tag Manager common errors

1. Error 403

There are two reasons why you see a 403 error:

  1. You used Server container GTM ID when setting up a custom loader.
  2. You did not publish the init version of the web container.

Solution:

1. If you use a custom loader and see a 403 error when opening the sGTM container URL, it might be because you've used the server Google Tag Manager ID when setting up a custom loader. You must add your WEB Google Tag Manager ID.

To check the custom loader setting: log in to stape.io account -> open sGTM container -> click Power Ups -> open custom loader and check if you added WEB GTM ID

custom loader to make gtm and ga4 scripts resistant to ad blockers
custom loader to make gtm and ga4 scripts resistant to ad blockers

Change the container ID to the WEB container ID, click save, and update the GTM script on your site.

To find your Web container id, you need to open Google Tag Manager and select your web container. There you will be able to see the web container id.

2. You did not publish the init version of the web container.

Open your web Google Tag Manager container and ensure that it's published and running. 

2. ERR_BLOCKED_BY_CLIENT

err_blocked_by_client - stape

Usually, it occurs when a request is blocked by something, e.g. Chrome Developer Tools or an ad-blocking plugin.

Try to check if error still appears in incognito mode or in another browser. Also, try to disable all extensions in your browser and check if error is still present.

3. ERR_BLOCKED_BY_ORB

err_blocked_by_orb - stape

Error usually occurs when a request is blocked by the browser’s tracking prevention.

Check if you are sending request to Google Ads or any other tracking service with correct consent settings.

Also check if ​dma_cps parameter is present in the request url and set to ​dma_cps=sypham.

4. Error 404

Error: Fetching container from https://www.googletagmanager.com/ failed: Received HTTP status code 404.

That means we can't download the configuration of your sGTM.

That can be because of:

- sGTM container is deleted

- sGTM container not published

- You use the wrong configuration code

Solution:

If none of the above issues exist, we recommend creating and using a new sGTM container. You can utilize export and import functionality to migrate your existing configuration.

5. Error 500

You can receive 500 in cases when some tag changes the response code. For example, in case there was an error in some tag. 

Looks like you sent requests with a preview header and tried to debug something.

Also, if you see a 500 error when opening the preview mode of the server GTM container, it means that you've exceeded the limit of the Google Cloud free tier.

Solution:

Go to the GCP console and upgrade to the production environment to solve this issue. The minimum price of a Google Cloud production environment is $120/month. You can get the same setup on stape for only $20/month.

If you already set Google Cloud to production mode and get a 500 error, your sGTM tagging server is down. In this case, we suggest contacting Google support. 

6. 503 Service Temporarily Unavailable

This error means that your tagging server is down. You should check your deployment status in Google Cloud Platform. 

Solution:

In most cases, you can’t solve this problem independently and need to contact hosting support. If you use stape.io, then send an email to support@stape.io

7. Error: DNS_PROBE_FINISHED_NXDOMAIN

This error usually happens when you are using a custom subdomain but didn’t set up DNS records for your subdomain or set it up incorrectly. On average, you have to wait 3-4 hours before DNS changes are applied; some DNS providers ask to wait up to 72 hours. 

Solution:

To check if DNS is set up correctly, I use this tool. All you need to do is paste your subdomain and check A or any other record. You should see that it points to the correct IP. If IP is not accurate, check the DNS settings of your domain again.

8. Error: 400

HTTP ERROR 400. This page isn’t working

400 response for tagging server URL is correct behavior. 

To check if tagging server URL works correctly, you should add /healthy at the end of the URL. If the response is ok, then tagging server URL worked correctly. 

 add /healthy at the end of the tagging URL

9. Error: Server Error

Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.

This error usually happens when the server is down because of numerous requests sent to your server.

This error usually happens when the server is down because of numerous requests sent to your server.

Solution:

You need to upgrade your server's resources in the GCP admin. If you use the free Stape plan, you may have exceeded the requests limit, so you need to upgrade the plan. The paid plans at Stape start at only $20/month, while the minimum price for Google Cloud is $120/month. So you save a lot of money.

With Stape, you won’t face such a problem again because we automatically add resources (CPU, RAM) to your sGTM account when you run out of them. You don't need to take any additional actions.

Google Tag Manager mistakes and best practices

1. Getting lost in Google Tag Manager containers

If you have a few containers (consequently, you run a few websites) in your GTM account, you may face a problem when the tags aren’t fired in Preview and Debug mode. The reason can be a wrong container.

In this case, check the container ID you are testing changes in and ensure the ID is the same as in the Javascript snippet on your website (see screenshots below).

To check ID on your website, go to any page -> click Ctrl+right button -> “Inspect” -> Ctrl+F -> paste container ID.

Container ID in GTM
Container ID on the website

2. Skipping the Event Setting variable when creating a tag

GA4 is event-based analytics, where most things that happen on your site are events. So, while setting up tracking, you often encounter event creation. Predefined Event Setting variable can make the process easier and quicker.

How does it work? Instead of adding the same event parameters and values multiple times, create one variable that includes all the parameters you often use and add it to the “Event Parameters” section of the tag.

Event variable inn GTM

To create such a variable, go to “Variables” and in the User-Defined Variables, click “New”. In the “Variable Configuration” choose “Google Tag: Event Settings”. Below you can add all the parameters and values you frequently use when setting up event tracking.

3. Overloading triggers with conditions

People often add many “contains” conditions to a single parameter to create a trigger that includes multiple conditions.

For example, you want a tag to trigger on a few pages: Page A, Page B, and Page C. Instead of adding three “Page URLs” with the condition “contains” for each page, you can use a regular expression (RegEx). RegEx helps filter data by multiple parameters (URLs in this example) in a single condition. 

4. Publishing changes in bulk

When you work on setting up tracking of a bunch of features, the best thing you can do is to publish each one by one after testing. Otherwise, publishing all the changes in one container version, you always risk reverting all of them if one doesn’t work. Then, the setup starts all over again because of one thing that doesn’t work.

5. Improper Preview and Debug console use

Preview and Debug mode can bring many ideas on making tag fire if appropriately used.

If your setup goes wrong, find the tag you want to fire in the “Tags Not Fired” section. It will show the variables that weren’t triggered.

Trigger parameter that didn't fired

Then go to the tab “Variables”. It will help you find variables and their values to set up the trigger and make the tag fire.

Variable section in Debug and Preview mode of GTM

6. Skipping GA4 DebugView

After testing tracking in GTM Preview and Debug mode, it is better to double-check whether everything works in GA4 DebugView. You will ensure the event comes to the GA4 account. Especially if you have a few GA properties, you avoid sending data to the wrong property with this check.

To check if the event appears in your GA4 property, go to Admin -> Data display -> DebugView and look for the event you just set up.

debug view in ga4

7. Not naming versions in your container

If you follow the fourth suggestion and publish each change individually, adding a name to every container version will make your work with GTM easier. Naming container versions will be especially helpful for long and difficult tracking setups. This way, you can easily find what has already been done without clicking through each unnamed version.

Conclusion:

I hope this article will help you identify some of the most common problems with sGTM tagging servers and solutions to fix them. Some issues can be resolved immediately, and others require the help of your hosting provider. Our team of experts is always happy to help new users get started with tracking and answer any questions.

If you face any issues with stape.io hosting, do not hesitate to send an email to support@stape.io, we will be happy to assist. Or, if you need help with setting up server-side tracking for your site, we can also help.

Tagged with:gtm server

Try Stape for all things server-sideright now!