A missing analytics event can result from several different failures. A tag might not execute, its code might throw, or the application might reject the action. One error listener cannot explain all three. Start by deciding which failure the measurement must detect.
Name the failure before choosing a monitor
GTM tag execution, browser exceptions and application outcomes are different signals. A tag execution status describes a tag within the container. An uncaught exception is a JavaScript error that no applicable handler caught. A failed export describes an application outcome, which might occur without any JavaScript exception.
Consider a hypothetical report page. The application returns an export failure, then displays a useful message. Its code can work as intended while the export fails. Conversely, the export can succeed while the analytics code fails. Give these outcomes separate names before deciding where to observe them.
An HTTP error is another distinction. A missing page or rejected request does not automatically become a JavaScript exception. If the application knows that an operation failed, an explicit result event can communicate that fact. Do not infer every business failure from a browser error message.
Read tag execution metadata in the correct GTM context
Google documents addEventCallback as a Custom Template API. Its callback receives a container ID and event metadata. That metadata includes the IDs, execution statuses and execution times of tags that fired for the event.
This supported API belongs to sandboxed custom templates. It is not a normal browser global that a Custom HTML tag can call. A browser script and a custom template can both contribute diagnostic signals, but they run with different APIs. Combining their reporting does not make those APIs interchangeable.
