Skip to content

GTM. Unique event_id. Dedupe purchase hits across web and server tags.

What this means for your store

Browser pixel plus server CAPI without deduplication routinely inflates ROAS and breaks attribution reviews. event_id is a client-generated identifier on each conversion: ad platforms match browser and server hits on the same ID and count one sale. Set it once in dataLayer and map it through every tag that fires on the same order.

Scenario on a real storefront

A DTC skincare brand runs Meta browser pixel and Stape CAPI on the same purchase. The storefront sets event_id from the order object before GTM tags fire:

// Storefront (before GTM fires tags)
dataLayer.push({
  event: 'purchase',
  event_id: 'ORD-88421-' + Date.now(),
  ecommerce: { transaction_id: 'ORD-88421', value: 129.00, currency: 'USD' }
});

// GTM variable: DLV - event_id
// GA4 Event tag → Event parameter event_id = {{DLV - event_id}}
// Meta Pixel tag → Event ID = {{DLV - event_id}}
// Server CAPI tag → same variable via transport

What to do next

  • Generate event_id once per order on the page - a new ID on every tag fire breaks deduplication.
  • Pair order ID with a timestamp only when test and prod IDs could collide in Events Manager.
  • Validate in Meta Test Events: one purchase should show browser and server rows with the same event_id.

Bottom line

event_id is cheap insurance against double counting on hybrid tracking setups. Push it in dataLayer, wire it through browser and server tags, and verify in platform debug tools.