Postback Keitaro → TikTok Events API
A Keitaro to TikTok Events API postback makes sure conversions from your PWA offer — leads, deposits, purchases — reach the TikTok ad account directly from the server, without the losses browser pixels suffer from blockers and privacy limits. Server-side delivery through the Events API is more reliable than a client-side pixel alone and gives TikTok richer signal for optimization. Here's the full setup, including deduplication so a conversion never gets counted twice.
Why the TikTok pixel alone isn't enough
The browser-side TikTok pixel loses events to ad blockers, mobile browser privacy limits, and the gap between an ad click and a deposit on the offer that might happen a day later. The Events API sends the event straight from the tracker's server, bypassing the user's browser, so data arrives more reliably and within seconds rather than getting dropped entirely. For PWA verticals with a longer cycle, where the deposit doesn't happen right after install, this matters even more: without S2S, most late conversions simply never reach TikTok's optimization.
Prep: ttclid, Pixel Code and Access Token
First, capture ttclid (TikTok's click ID) from the URL parameter when the user lands on the PWA — without it, TikTok can't match the server-side event back to a specific ad impression. In TikTok Events Manager, you'll either already have a Pixel Code or need to create one, and an Access Token is generated separately in the pixel's settings to authorize Events API calls. Both the Pixel Code and Access Token are needed on the Keitaro side when setting up the conversion flow.
Setting up the postback in Keitaro
In Keitaro, the conversion flow for an offer is configured under Conversions/Postbacks: create an outgoing postback to the TikTok Events API endpoint, substituting macros for {clickid} (the captured ttclid goes here), {status} (mapped to the right event — CompletePayment for a deposit, for example) and {sum} when passing conversion value. Map Keitaro's statuses (lead, sale, rejected, etc.) explicitly to TikTok events rather than firing the same event for every status — otherwise TikTok optimizes toward the wrong signal. APEX supports S2S postbacks with Keitaro out of the box, so status mapping and macro handling are configured without writing a custom server-side proxy.
Deduplication and verifying nothing doubles up
If the landing page runs the browser TikTok pixel alongside a configured server-side Events API call, the same event can get counted twice in TikTok's reporting. The fix is a single event_id generated on the tracker side and passed to both the pixel (if present) and the Events API for the same event — TikTok deduplicates automatically on that identifier. After setup, always verify the flow with a test event in TikTok Events Manager — it shows whether the event arrived, with which status, and whether it's being double-counted.
FAQ
- What if conversions from Keitaro aren't reaching TikTok?
- Check that ttclid is actually being captured by the tracker (not an empty {clickid} macro), that the Access Token hasn't expired, and that the endpoint URL in the postback is typo-free — Keitaro's logs show TikTok's response code for every postback sent.
- How do you avoid double-counting conversions between the pixel and the Events API?
- Use a shared event_id for the same event across both channels — pixel and Events API — and TikTok deduplicates them automatically, counting it as one conversion instead of two.
- Do you still need the browser pixel if S2S is already set up?
- It's worth keeping the pixel for upper-funnel events like views and clicks where delay risk is low, and routing critical conversions like deposits through the Events API — that way you get both signal coverage and delivery reliability.
Cloaking, anti-bot, push, split tests and your own domains — in one service.
Get started free