Blog

Identify a single misconfigured tag from container logs

When something is wrong but you do not know what, the logs have the answer.

A subtle misconfiguration in one tag is the bug that takes hours without method, minutes with.

Step 1: characterise the symptom

"Meta CAPI shows 30 percent fewer purchases since Tuesday" is a useful starting point. "Tracking is broken" is not.

Step 2: filter for outgoing requests

CodeCause
200/204Sent. Issue is downstream.
400Malformed payload.
401Auth token expired or wrong.
429Rate limited.
5xxDestination problem.

Steps 3-6

  • Compare to baseline. Pull the same metrics from a week ago. The diff points at what changed.
  • Look at recent workspace changes in GTM Versions. The bug is almost always among them.
  • Reproduce in preview mode. Fire a synthetic event and watch the request panel.
  • Roll back if not fixed in 30 minutes. Cost of leaving a broken state is larger than running the previous version.

For ongoing observability, structured logging makes investigation much faster.