Ad platform integration

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
ConnectionEvents API 2.0 (server) plus the TikTok pixel (browser), sharing event ids
EventsViewContent, AddToCart, InitiateCheckout, CompletePayment (legacy name for Purchase)
Customer dataEmail and phone hashed with SHA-256, external_id, IP, user agent
Click idsttclid and the _ttp cookie
CredentialsPixel code and an Events API access token
Spend syncYes, 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

  1. In ROASaurus, go to Tracking & platforms and click Add pixel on the TikTok card.
  2. Enter your pixel code and an Events API access token.
  3. Keep Also load the browser pixel on. The browser and server events then share ids and TikTok deduplicates them.
  4. Optional: paste a test event code to see events under Test events first.
  5. 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

FAQ

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 →