Tracking lab

dataLayer styles

gtag-style and object-style pushes, and what the bridge forwards, ignores or denylists.

Lane C3 · dataLayer events

Try it

gtag style: forwarded

gtag('event', 'view_item_list', { item_list_id, item_list_name, items, send_to })
view_item_list· dataLayerLane C3 · dataLayer events
gtag('event', 'view_item', { value, currency, items, send_to })
view_item· dataLayerLane C3 · dataLayer events
gtag('event', 'add_to_cart', { currency, items: [{ …, quantity: 1 }], value, send_to })
add_to_cart· dataLayerLane C3 · dataLayer events

Object style: forwarded

dataLayer.push({ ecommerce: null }); dataLayer.push({ event: 'view_item', ecommerce: { value, currency, items } })
view_item· dataLayerLane C3 · dataLayer events

Not events: ignored

gtag('js', new Date()); gtag('config', 'GTM-SITE1'); gtag('set', 'developer_id.example', true)
Ignored: not eventsLane C3 · dataLayer events
gtag('consent', 'update', { ad_storage: 'granted', analytics_storage: 'granted' })
Ignored: not an eventLane C3 · dataLayer events
dataLayer.push({ isLoggedIn: false, Iso: 'GB', product: 'site-1-shop', memberID: null, balance: null })
Ignored: not an eventLane C3 · dataLayer events

How it works

Some sites push GA4 events with gtag('event', …), which puts an Arguments object on the dataLayer instead of { event: … }. Each button pushes messages the way such a site does.

The Klaviyo bridge (loaded by this site's GTM tag) normalises both styles to { event, ...properties }, ignores anything that isn't an event, and removes transport keys such as send_to. That is lane C3: piggybacking pushes the front end already makes.

What to expect in the console

One entry per message a button pushes, with the bridge's own verdict (it uses the bridge's normaliser and denylist, so it matches what the live adapter does):

  • pushed → forwarded: the bridge sends it, then an observed Klaviyo.js call follows.
  • ignored: not an event (config, consent, page state).
  • denylisted: an event the central filter excludes.
  • bridge not loaded: the GTM tag hasn't run on this page.

Open an entry's payload to see the raw push, including ‹undefined› values and Arguments.

Full console