TikTok Events API, sent from your server
ROASaurus sends shopping events to TikTok's Events API 2.0 from the server, with the same event ids as the TikTok pixel. It also pulls TikTok spend for ROAS and creative reports.
| TikTok at a glance | |
|---|---|
| Connection | Events API 2.0 (server) plus the TikTok pixel (browser), sharing event ids |
| Events | ViewContent, AddToCart, InitiateCheckout, CompletePayment (legacy name for Purchase) |
| Customer data | Email and phone hashed with SHA-256, external_id, IP, user agent |
| Click ids | ttclid and the _ttp cookie |
| Credentials | Pixel code and an Events API access token |
| Spend sync | Yes, with an advertiser id and a Marketing API token |
What ROASaurus sends to TikTok
Four events go to the Events API: ViewContent, AddToCart, InitiateCheckout and CompletePayment. TikTok has renamed CompletePayment to Purchase and still accepts the old name as a purchase. Page views go through the browser pixel only; the server does not send PageView to TikTok.
Each event carries the event id, the page URL, the ttclid click id, the _ttp cookie, the IP address and the user agent. When the shopper is known it adds their email and phone, hashed with SHA-256, and a hashed customer or visitor id as external_id. Properties hold the currency, value, order id and each product's id, name, quantity and price.
TikTok can answer HTTP 200 and still reject an event with an error code in the body. ROASaurus reads that code, so a rejected event shows as failed in the Event log instead of passing silently.
How to connect
- In ROASaurus, go to Tracking & platforms and click Add pixel on the TikTok card.
- Enter your pixel code and an Events API access token.
- Keep Also load the browser pixel on. The browser and server events then share ids and TikTok deduplicates them.
- Optional: paste a test event code to see events under Test events first.
- For spend, add your advertiser id and a Marketing API token.
Spend and creative reports
With spend synced, TikTok campaigns show ROAS and CPA next to Meta in attribution. Creative analytics adds TikTok's video stats: hook rate counts 2-second views and hold rate counts 6-second views. Name your ads with hook, creator and format to compare them.
Limits
- If the TikTok sales channel app also sends this pixel, purchases are counted twice. Disconnect the pixel in that app.
- ROASaurus only counts orders it can tie to a click, so its totals usually differ from TikTok Ads Manager.
Related
Questions, answered
Why is a purchase called CompletePayment?
CompletePayment is the older name of TikTok's purchase event; TikTok now calls it Purchase and still accepts the old name. ROASaurus uses CompletePayment in both the browser pixel and the Events API, so TikTok can match the two copies on event_id.
Do I need the TikTok app on Shopify as well?
No. If you keep it, disconnect the pixel in the TikTok app, because events it sends use different ids and TikTok would count each purchase twice.
Can I test before going live?
Yes. Paste the test event code from TikTok Events Manager into the pixel settings. Events then show under Test events. Remove the code when you are done.
Every sale, traced to the ad that earned it
Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.
Start your free trial →