TikTok server-side tracking means sending your conversions to TikTok’s Events API from a server, next to the TikTok Pixel in the browser, with the same event_id on both so TikTok counts each conversion once. Meta’s Conversions API (CAPI) and Google Ads conversion tags in a server container follow the same pattern with their own rules, so one server container usually feeds all three.
This guide starts with TikTok, because its Events API has the most fields to get right, then covers Meta CAPI and Google Ads, the rollout, and how to keep the three in agreement after release. It assumes a working server container; if you don’t have one yet, follow our GTM server-side setup first. For the concept and the trade-offs, see the pillar on server-side tracking.
The three conversion APIs side by side
| TikTok Events API | Meta Conversions API | Google Ads in server-side GTM | |
|---|---|---|---|
| Browser counterpart | TikTok Pixel | Meta Pixel | Google tag and Google Ads tags |
| Event ID for deduplication | event_id, same as the Pixel’s | event_id, same as the Pixel’s eventID | Remove the browser tag once the server tag works |
| Deduplication window | 48 hours | 48 hours | Not applicable |
| Fallback key | _ttp cookie | fbp and/or external_id | Not applicable |
| Main match keys | ttclid, _ttp, hashed email, phone, external_id, IP, user agent | Hashed email and phone; fbp, fbc, IP and user agent unhashed | User-provided data for enhanced conversions |
The table hides one shared rule: every platform needs the same identifier on the browser event and the server event. Most double-counting comes from that ID being generated twice.
TikTok Events API: set it up
TikTok’s documentation calls the Events API a reliable connection between TikTok and your marketing data, and recommends setting it up as a second channel together with the Pixel. Pixel or Events API setup is also a prerequisite for the Web Conversions objective in TikTok Ads Manager.
Pick the integration route
TikTok lists three ways in:
- Server-side GTM, through TikTok Events Manager. The interactive setup flow connects both the Pixel and the Events API through your GTM containers. TikTok calls this combined option the recommended one, for event coverage, campaign performance and automatic deduplication. You need a web container, a server container, a GA4 setup and a Google Cloud billing account.
- Partner integrations. Commerce platforms such as Shopify and WooCommerce, and data partners such as CDPs, tag managers and CRMs.
- Direct API integration, when you need more control of the data and have engineers to build it. The fields, deduplication rules and tests of a direct integration are in TikTok Events API: fields, deduplication and validation.
What the GTM setup flow creates
TikTok documents every item the setup flow adds to your containers, which is useful when you audit them later:
| Container | Item | What it does |
|---|---|---|
| Web | Google tag TT-{PixelCode}-Web-Tag-GA4_Config | Sets the tagging server URL |
| Web | GA4 Event tag TT-{PixelCode}-Web-Tag-GA4_Event | Defines the data sent to the tagging server |
| Web | Custom HTML and TikTok Pixel tags | Install the Pixel and send browser events |
| Web | Custom JavaScript variables for user data, items, currency, value, external ID and event ID | Feed the server-side events |
| Server | Tag from the TikTok Events API (Official) template | Sends server events to the Events API |
| Server | Custom trigger TT-{PixelCode}-Server-Trigger-All_Event | Selects the events to send |
The event ID variable is the one that makes deduplication work: the flow configures it for you. In a manual setup, TikTok suggests a custom JavaScript variable for the event_id.
The request, field by field
Every route ends in the same call. TikTok’s Events API 2.0 reference defines it as a POST to https://business-api.tiktok.com/open_api/v1.3/event/track/, with an Access-Token header:
{
"event_source": "web",
"event_source_id": "YOUR_PIXEL_CODE",
"data": [{
"event": "Purchase",
"event_time": 1763290000,
"event_id": "order_10482",
"user": {
"ttclid": "E.C.P.…",
"ttp": "value of the _ttp cookie",
"email": "sha256 of the normalized email",
"ip": "203.0.113.1",
"user_agent": "Mozilla/5.0 …"
},
"page": { "url": "https://www.example.com/checkout/thanks" },
"properties": { "currency": "EUR", "value": 120.00, "content_type": "product",
"contents": [{ "content_id": "SKU-123", "price": 60.00 }] }
}]
}
event_sourceiswebandevent_source_idis your Pixel Code.event_timeis a Unix timestamp in seconds, UTC.page.urlis required for web events: the full URL, with its parameters.valueandcurrency(ISO 4217) are needed for ROAS reporting and value-based optimization.valueis the order total;priceis per item.- One request takes up to 1,000 events, and a request with more is rejected whole. TikTok still recommends sending each event in real time, without batching.
Match keys and hashing
TikTok matches server events to its users with click IDs, advanced matching and signals such as IP and user agent, and recommends sending several kinds at once.
| Field | Hash it? | Rule from TikTok’s docs |
|---|---|---|
ttclid | No | The click ID TikTok appends to the landing page URL |
ttp | No | The value of the _ttp first-party cookie the Pixel sets |
email | SHA-256 | Trim spaces and lowercase before hashing |
phone | SHA-256 | Normalize to E.164 (+12133734253) before hashing |
external_id | SHA-256 | Your own user, loyalty or cookie ID |
ip, user_agent | No | Send both together |
The common bug is hashing before normalizing. A hashed email with a trailing space is a different hash, and it never matches.
Deduplication with the Pixel
TikTok deduplicates on three values: event_source_id, the event name and event_id. According to TikTok’s deduplication documentation:
- It keeps the first event and discards duplicates received within 48 hours of it.
- A duplicate received within 5 minutes is merged into the first, so an email the server knows can complete a browser event that lacked it.
- Order numbers make good event IDs. A random value works only if the Pixel and the Events API share it.
On the Pixel, the ID is the third argument of the track call:
ttq.track('Purchase', { value: 120.00, currency: 'EUR' }, { event_id: 'order_10482' });
Without event_id, TikTok can deduplicate on the _ttp cookie instead, with tighter limits: a 5-minute window, and it only ever drops the server event, never the browser one. To use it, leave event_id out of the Events API payload altogether.
Test before production
- In Events Manager, open the Pixel and go to Test Events. Copy the test code.
- Add it as
test_event_codeto the request body and send an event. - Look for the event under Event Activity. Payload problems show up there.
- Remove
test_event_codebefore going to production.
On the Pixel’s overview, the connection method should read Server & Browser. If the Server & Browser numbers stay low, TikTok’s advice is to check that the event_id is identical on both sides.
TikTok’s help article on the Events API is the entry point to these documents. For TikTok Smart+ campaigns specifically, our TikTok Smart+ tracking setup covers routing and QA, and the TikTok Pixel Helper guide covers the browser side.
Meta Conversions API from the server container
Meta recommends running the Conversions API alongside the Meta Pixel, and Meta’s deduplication guide sets the rules:
- An event is a duplicate when the Pixel’s
eventIDmatches the CAPIevent_idand the Pixel’s event matches the CAPIevent_name. - On the Pixel,
eventIDis the fourth argument of thefbqtrack call. - Events are deduplicated only within 48 hours of the first one, and Meta generally keeps the one it received first.
- Without event IDs, Meta can deduplicate on
event_nameplusfbpand/orexternal_id, used consistently on both sides. That mostly works when the browser event arrives first.
In a server container, a CAPI tag reads the GA4 event and maps its fields to Meta’s parameters. See Meta’s Conversions API documentation for the full reference and Meta’s CAPI parameter list for customer information fields: email and phone are hashed, while fbp, fbc, IP address and user agent must not be. Our posts on Meta CAPI validation and CAPI deduplication issues cover what usually goes wrong.
Google Ads conversions through server-side GTM
Google Ads doesn’t need a separate API call from a server container. Google’s server-side Ads guide uses the GA4 stream the container already receives:
- Add a Conversion Linker tag to the server container.
- Mark the conversion as a key event in GA4 and send it with a GA4 Event tag from the web container.
- Add a Google Ads Conversion Tracking tag to the server container with the conversion ID and label, triggered by the same event name. It reads transaction ID, value and currency from the ecommerce fields.
- For enhanced conversions, pass a User-Provided Data variable as the
user_dataparameter of the Google tag. Hashed values go in keys with thesha256_prefix. - Check the Tags and Console tabs in the server container’s preview, then remove the matching Ads tags from the web container so conversions aren’t counted twice.
Remarketing needs its own server-side setup; Google’s guide links to it. For enhanced conversions in more depth, see our guide to enhanced conversions for Google Ads.
Roll it out without double counting
- Audit. List the conversions each platform receives today, with their parameters.
- Pilot. Send one low-impact event (a view or add-to-cart) through the server while the Pixel keeps running.
- Compare. Check each platform’s diagnostics: TikTok’s Test Events and connection method, Meta’s Events Manager, and the server container’s preview for Google Ads.
- Move the conversions that matter. Purchase, lead and sign-up, each with a shared event ID.
- Decide on the browser tags. TikTok and Meta recommend keeping their Pixels next to the server; for Google Ads, the server tag replaces the browser one.
Consent doesn’t change because the request now leaves from a server. Where the visitor’s choice is checked in a server container is covered in consent-aware server-side tracking.
Keep the three platforms in agreement
Each platform shows its own diagnostics, and none of them shows the other two. A template update that drops event_id on TikTok, a GA4 change that empties value, or a trigger that stops matching after a web release shows up in each platform as fewer conversions, weeks later, as a performance problem.
Trackingplan sees the conversions where they are sent: the Pixel hits in the browser and, with its tag for server-side GTM, the requests your server tags send to TikTok, Meta, Google Ads and the rest. It flags missing properties, duplicate fires and broken triggers on real traffic. When the server container forwards a conversion to Meta, TikTok or another destination, Trackingplan reads the Google Consent Mode state the container copied from the browser event, so you can check that each destination only received data from visitors who accepted. For TikTok Pixel events, it lists every product the contents array carries, so a missing product ID shows up per item. Setup steps are in Trackingplan in a server-side setup.
FAQ
What is TikTok server-side tracking?
It is sending your website’s conversion events to TikTok’s Events API from a server, instead of only from the TikTok Pixel in the browser. TikTok recommends running both together, with the same event_id on the Pixel event and the Events API event, so each conversion counts once.
Do I need the TikTok Pixel if I use the Events API?
TikTok recommends both. Its documentation describes the Events API as a second channel next to the Pixel, and calls the combined Pixel and Events API setup through server-side GTM the recommended option for event coverage, campaign performance and automatic deduplication.
How does TikTok deduplicate Pixel and Events API events?
By event_source_id (the Pixel Code), the event name and event_id. TikTok keeps the first event and discards duplicates received within 48 hours; a duplicate received within 5 minutes is merged into the first. Without event_id, TikTok can fall back to the _ttp cookie, but only within 5 minutes and only dropping server events.
Which user data should I send to the TikTok Events API?
As many match keys as you lawfully can: ttclid from the landing URL, the _ttp cookie value, IP address and user agent unhashed, and email, phone and external_id hashed with SHA-256 after normalizing them as TikTok describes.
Can one server container send to TikTok, Meta and Google Ads?
Yes. A server-side GTM container receives one stream of events, usually GA4, and separate tags forward them to each platform: TikTok’s official Events API tag, a Meta Conversions API tag and Google Ads Conversion Tracking. Each platform keeps its own rules for tokens, match keys and deduplication.