SaTracking
PlatformsNEWIntermediate

Fix empty event parameters in a GTM tag

Use Preview to verify a real value on the success event, no value on a failure event, and the expected behavior on a second action. If data is still empty,

Download for AI (.txt)

Measurement topic illustration · SaTracking

Audience and prerequisites

Trace a blank event parameter from the tag mapping back to its data-layer key, path and timing, then retest the corrected value. You need access to Preview, the tag configuration, and the application event payload. Skill: intermediate. Reading time: six minutes.

1. Confirm which value is empty

In Tag Assistant, select the event and inspect the data layer at that exact point. Compare the pushed key, nesting, and value type with the Data Layer Variable configured in GTM. Do not infer a key path from a dashboard label or a later event.

2. Trace the variable to the tag parameter

Open the variable and confirm the Data Layer Variable Name matches the payload. Check the variable version and nested path, then inspect its resolved value on the firing event. Open the GA4 Event tag and confirm the event parameter uses that variable and is named exactly as intended. Variables read values; the tag maps them to a destination.

3. Check timing and overwritten state

The data layer processes messages in order. A tag may fire before the application pushes a value, or a later push may replace an existing key. Confirm the data is in the same message as the custom event or available before the tag runs. Do not reinitialize window.dataLayer after GTM loads; that can disconnect pushes from the container's monitored queue.

Generic data-layer illustration

js
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'generate_lead',
  form_id: 'contact_sales'
});

This is only a website message. It is not a GA4 event until a configured GTM tag forwards it.

4. Test the corrected payload

Use Preview to verify a real value on the success event, no value on a failure event, and the expected behavior on a second action. If data is still empty, check exact key casing, nested structure, tag firing event, and whether code pushes to another data-layer instance. Do not substitute a hard-coded default that misrepresents the action.

Privacy and limits

Only map approved fields. Exclude personal data and free text. Preview proves what the variable resolved in that session; DebugView can separately confirm receipt, but neither proves downstream reporting or business correctness.

See GTM Data Layer Variables for the variable mapping workflow.

Official references

EDITORIAL HISTORY

What changed

  1. v1.0.0
    Initial bilingual guide drafted and checked against current official Google documentation.
MEASUREMENT SUPPORT

Need a hand with your tracking?

Nicolas Salazar works with teams on analytics, tracking plans, data quality, consent, and implementation.