Event ID
How it works
When an event happens, an ID is created, for example a random UUID or the order number. That ID goes to both reporting paths: the pixel in the browser and the server that calls the Conversion API. The platforms name the field differently:
- Meta:
eventIDin the pixel,event_idin the Conversions API - TikTok:
event_idin both pixel and Events API - LinkedIn:
event_idin the Insight Tag,eventIdin the Conversions API - Google Ads: the transaction ID (
transaction_id)
Why it matters
Without an event ID, the platform can't tell that two reports describe the same thing. It counts twice, and optimization learns from wrong numbers. The ID also helps with debugging: it lets you find a single event in the platform's test tool and see whether it came from the browser, the server or both.
TSO creates one event ID per event and passes it to pixel and server alike.
Example
A visitor submits a contact form at 2:03 pm. The tracking script creates the ID 3f6c1b2e-8d4a-4c7e-9b1f-2a5d6e7f8a90.
- The Meta pixel immediately sends
Leadwith thateventID. - Shortly after, the server also sends
Lead, with the sameevent_idplus the hashed email address. - Meta recognizes both reports as the same event and counts one lead.
Without the shared ID, the ad account would show two leads, and the cost per lead would look half of what it really is.
Common mistakes
- Creating IDs separately: if browser and server each generate their own random ID, nothing matches. The ID has to be created in one place and handed to the other.
- One ID for several events: using the session ID as the event ID makes the platform discard the second lead of the same session as a duplicate.
- Different formats: the order number makes a good event ID for purchases, but only if it looks the same in browser and server:
1042, not#1042on one side. - Wrong field name:
eventIDbelongs in the Meta pixel,event_idin the Conversions API. Swapping them throws no error, but deduplication doesn't work.