Don't have one? Create one ↗
Choosing a tracking method

Lesson 2 of 4

The Reliability Ladder

Rank the methods by how durable and data-rich they are. Always reach for the highest rung that's realistically available.

1. dataLayer pushbest2. Built-in triggersolid3. DOM scrapestopgap4. Custom listenerlast resort

Why this order

  • dataLayer push: intentional, structured data the developer guarantees. Survives redesigns, carries rich context. The gold standard.
  • Built-in trigger / auto-event: GTM's own click, link, form, scroll, visibility triggers. No code, well-tested, but limited to what GTM can observe.
  • DOM scrape: read values out of the markup. Works today, but brittle, a layout change breaks it silently. A patch, not a foundation.
  • Custom listener: hand-written JS for things nothing else can catch (an embed's API, an obscure interaction). Powerful but the most code to own and maintain.

Note the tension: a dataLayer push is best but needs developer time; a built-in trigger is self-serve but can't capture everything. The next lesson resolves that trade-off.

Key takeaway

Prefer a dataLayer push, then a built-in trigger, then a DOM scrape, then a custom listener. Climb as high up the ladder as the situation allows.