Search

What is Code Cube

User management

Notifications & alerts

Understanding & solving tracking errors

Privacy & security

FAQ

🧰

Debug Tag Monitor errors server-side

🤝

These guidelines are constantly updated based on best practices we find along the way. Do you have any specific findings? Please help us get these docs as complete as possible.

Debugging errors in Google Tag Manager server-side

GTM server-side container gives more insights on the errors than the client-side container. Do you encounter a high percentage of failed tags (+75%)? Make sure to open the preview mode and look into the tab 'Console'. More information on the specific error can be found there.

💡

Tip: For more insights on the Code Cube errors you can also retrieve detailed insights via the server-side error logs. Please contact us if you require more information.

General server-side tips

  1. Use trigger type 'Custom' as little as possible. This one is too generic and therefore causes errors quickly.
  2. Want to fire on all events? It is better to use trigger type 'Custom Event' with a wildcard (.*)
  3. Verufy if the client handling the event is implemented correctly.
  4. Inspect incoming event payloads. Use the Event Data tab in GTM server-side preview to check what data is actually received. Misformatted or missing parameters are a common cause of failed conversions or missing events.
  5. Verify client mappings. If events are not handled correctly, double-check that the correct GTM Client (e.g., GA4, Universal Analytics, HTTP) is active and properly matching incoming requests.

Google Ads

Conversion Linker failing? Make sure the region specific settings are added in your server-side instance (Cloud Run for example).

Tag incorrectly marked as ‘failed’? In some cases, the Google Ads Conversion tag is marked as failed, even when conversions are tracked correctly in Google Ads. This is a known false error due to cookie prefix mismatches.

👉 Read how to fix this issue

Facebook Conversion API

  1. Facebook is very strict on all event parameters. When a Facebook tag fails, this is mostly caused by an event parameter not having the right value.
    • Using a variable to fill in the value of the event parameter? Make sure to always add a default value to send.
  2. Check the trigger added to the tag. It might be the trigger fires on events where you don't want it to fire, so it can't fill in all parameters and throws an error. Make sure to also check our general tips on setting up triggers in the server-side environment.

TikTok Conversion API

  1. Facebook is very strict on all event parameters. When a Facebook tag fails, this is mostly caused by an event parameter not having the right value.
  2. Using a variable to fill in the value of the event parameter? Make sure to always add a default value to send.
  3. Check the trigger added to the tag. Is the trigger specific enough? It might be the trigger fires on events where you don't want it to fire, so it can't fill in all parameters and throws an error. Make sure to also check our general tips on setting up triggers in the server-side environment.

Criteo

  1. Make sure to check if all parameters are configured correctly.
  2. Using a variable to fill in the value of the event parameter? Make sure to always add a default value to send.

Additional Resources

  • Offload data to BigQuery

Need help with specific debugging scenarios? Contact our support team for personalized assistance.

Common Critical Error Patterns

In addition to general debugging tips, below are recurring error patterns we’ve observed across client implementations. These are generalized so you can recognize and resolve similar issues in your own setup.