TikTok Events API lets you report affiliate conversions to TikTok from your tracker instead of from a browser pixel on a page you do not own. When the network fires its postback, BATracker matches the click, looks up the ttclid TikTok appended to the landing URL, and posts a server event to TikTok's Events API 2.0 with the event name you mapped. TikTok attributes it to the ad group and creative, and your campaigns can optimize on real payouts.
This guide covers the traffic-source setup with TikTok's URL macros, the pixel code and access token, event mapping including custom events, the network postback, testing through Events Manager, and how to read results per ad group and creative. It assumes you already buy TikTok traffic and run offers through a tracker.
Quick answer
- What it does: every network postback becomes a TikTok server event tied to the click's
ttclid. - From TikTok you need: a Pixel Code and an Events API access token, both from Events Manager.
- In the tracker: a traffic source with External ID Parameter
ttclid, a TikTok pixel, the pixel attached to the campaign with an event, and the network's postback pointed at your universal postback URL. - Endpoint used: Events API 2.0,
POST /open_api/v1.3/event/track/with the token in theAccess-Tokenheader. - Debugging: Pixel Logs in BATracker show every payload and TikTok's response; Events Manager shows what arrived.
Why TikTok conversions need a server-side path
Most TikTok traffic lands in TikTok's in-app browser, and the conversion happens later on the advertiser's domain. A browser pixel on your lander cannot see that conversion. TikTok's own help article on the TikTok Click ID describes ttclid as the parameter appended to the landing page URL when an ad is clicked and strongly recommends sending it with web events through the Events API. Your tracker is the natural place to do that, because it already holds the click with its ttclid, IP, user agent and sub IDs when the postback arrives. The delivery pipeline is described in how BATracker sends conversions to Meta CAPI and TikTok Events API.
The flow
- User clicks the ad. TikTok sends them to your campaign URL and appends
ttclid. - BATracker records the click, stores
ttclidas the external ID, assigns a click ID and redirects to your lander or offer. - The offer URL passes
{click_id}to the network. - The network fires
https://track.yourdomain.com/postback?clickid=<id>&payout=<amount>. - BATracker stores the conversion, then sends the mapped event to TikTok with
user.ttclid, IP and user agent from the click. - The send is logged with payload, HTTP status and response.
Prerequisites
- A TikTok Ads account with a web Pixel in Events Manager and an Events API access token generated for it.
- A verified tracking domain in BATracker.
- A network postback already working for your offer. If not, start with how to set up S2S postback tracking.
Step 1: Traffic source with TikTok's macros
BATracker's TikTok Ads preset sets the External ID Parameter to ttclid and defines these URL parameters. The placeholders are TikTok's dynamic macros as documented on TikTok's UTM parameters help page.
| Parameter in your campaign URL | TikTok macro | Meaning | Suggested tracking field |
|---|---|---|---|
campaign_id |
__CAMPAIGN_ID__ |
Campaign ID | sub1 |
campaign_name |
__CAMPAIGN_NAME__ |
Campaign name | sub2 |
adgroup_id |
__AID__ |
Ad group ID | sub3 |
adgroup_name |
__AID_NAME__ |
Ad group name | sub4 |
ad_id |
__CID__ |
Creative ID | sub5 |
ad_name |
__CID_NAME__ |
Creative name | sub6 |
placement |
__PLACEMENT__ |
TikTok or TikTok Pangle | sub7 |
For upgraded Smart+ campaigns TikTok documents __ADID_V2__ and __ADID_V2_NAME__ for the ad bundle; add them as extra parameters (for example ad_v2=__ADID_V2__) if you run Smart+.
Do not add a ttclid parameter. The preset notes say it plainly: TikTok appends ttclid on every ad click, so the only setting that matters is External ID Parameter = ttclid. The value then appears in the Visit Log's external_id column and is used in the server event.
Step 2: The campaign URL in the ad
https://go.yourdomain.com/c/<campaignId>?campaign_id=__CAMPAIGN_ID__&adgroup_id=__AID__&ad_id=__CID__&placement=__PLACEMENT__
Paste this as the destination URL of the ad, or use TikTok's URL builder to add the parameters. TikTok replaces the macros at click time and appends ttclid. Keep the redirect mode at 302 or JavaScript; both work inside TikTok's in-app browser.
Step 3: Add the TikTok pixel to BATracker
Settings, Pixels, add a pixel of type TikTok. Enter a name, the Pixel Code (TikTok's identifier for the web pixel, which BATracker sends as event_source_id) and the access token. The token is encrypted at rest; only the worker that sends events decrypts it.
Click Test Event. The dialog accepts an optional test event code from Events Manager. BATracker posts a test event and logs the result in Pixel Logs as a test fire. If Events Manager's test view shows it, the code and token are valid.
Step 4: Attach to the campaign and map events
Open the campaign, Conversion Pixels, add the TikTok pixel and select the event to fire when a standard conversion arrives. BATracker lists TikTok's current web events: Purchase, CompleteRegistration, SubmitForm, Subscribe, Contact, Download, Search, ViewContent, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo, Schedule, StartTrial, SubmitApplication, ApplicationApproval, CustomizeProduct and FindLocation. The legacy names PlaceAnOrder, CompletePayment and ClickButton remain selectable because TikTok still accepts and maps them.
If the network sends several event types, use Custom Conversions on the campaign: map a postback event name (the event parameter, for example registration) to the TikTok pixel and a TikTok event (CompleteRegistration). Standard conversions keep firing the primary mapping, so one campaign can report registration and deposit as two different TikTok events without touching revenue reporting.
Step 5: Network postback
In the network's postback settings:
https://track.yourdomain.com/postback?clickid={click_id}&payout={payout}&txid={transaction_id}
clickid is required (click_id and cid also work). payout falls back to the offer payout when absent. txid lets BATracker recognize resent postbacks and answer them with success without creating another conversion or another TikTok event. Optionally add event={event} when the network can send event names.
What BATracker sends to TikTok
BATracker uses Events API 2.0: POST https://business-api.tiktok.com/open_api/v1.3/event/track/ with the token in the Access-Token header. The body has event_source: "web", event_source_id set to your Pixel Code, and a data array with one event:
| Field | Value |
|---|---|
event |
The mapped event name |
event_time |
Unix seconds when the postback was received |
event_id |
The conversion ID, stable across retries |
user.ttclid |
The stored TikTok Click ID |
user.ip, user.user_agent |
From the original click |
user.email, user.phone, user.external_id |
SHA-256 hashed where present; phone normalized to E.164 first |
properties.value, properties.currency, properties.order_id |
Payout, currency, transaction ID |
page.url |
The landing URL of the click |
The reference for the payload is TikTok's Events API 2.0 documentation. Because the event is only sent after the conversion row is written, a failed send never loses the conversion; the queue retries up to three times with the same event_id.
Testing end to end
- Open the campaign URL on your phone with a fake click ID appended:
&ttclid=test123. - Visit Log: find the click, confirm
external_idistest123and the sub fields hold the macro values (or the literal macro names if you clicked a preview). - Fire the postback in a browser:
https://track.yourdomain.com/postback?clickid=<click ID>&payout=1. - Conversion Log: the conversion appears with payout 1.
- Pixel Logs (Settings, Postbacks, Logs tab): the TikTok fire shows the JSON payload, status and TikTok's response. A
code: 0response means accepted. - Events Manager: the event appears under the pixel. With a real
ttclidfrom a real ad click it will also show attribution.
If the response reports an error, the message names the field. Typical causes: an expired token, a Pixel Code from a different account, or an event name TikTok no longer accepts.
Common mistakes
- External ID Parameter not set to
ttclid. Events go out without a click ID and TikTok falls back to IP and user agent matching, which attributes far fewer conversions. - Adding
ttclid=__CLICKID__or similar to the URL. Not needed. TikTok appends the real value itself. - Literal macro names in the click log.
__CAMPAIGN_ID__as a value means the click came from a preview or from a campaign type that does not fill that macro. Exclude those rows when you judge performance. - Optimization event and mapped event differ. If the ad group optimizes for CompleteRegistration and the tracker sends Purchase, TikTok learns from nothing. Align them.
- Testing only with real conversions. A manual postback plus a test event code finds configuration errors in minutes.
- No transaction ID. Networks resend. Pass
txidso duplicates are answered with success and never sent twice.
Optimization with sub IDs and reports
With adgroup_id, ad_id and placement in tracking fields, the BATracker report groups by any of them and shows visits, CR, revenue, cost, profit, ROI and EPC per row. Compare the tracker's conversions per ad group with TikTok's attributed count; differences reflect attribution windows and modeling, but a large gap on one creative usually means that creative sends traffic that never reaches the lander (slow page, in-app browser issues) rather than a reporting problem. What is EPC and how to calculate it explains how to compare creatives fairly at different click counts.
Practical habits:
- Split
placementinto TikTok and Pangle. Pangle inventory behaves like a display network and often needs its own bids and landers. - Send upstream events (registration, deposit) as custom conversions and let TikTok optimize on the one closest to payout that still has volume.
- Keep bot and datacenter clicks out with BATracker's filters so your event stream reflects real users. See the bot detection guide.
- Check TikTok's current documentation for the attribution window that applies to
ttclidmatched events, and compare it with your network's approval delay.
Policies
Server-side reporting is measurement, not a way around review. Report real conversions, keep landers and offers within TikTok's advertising policies and the local rules of your vertical, and expect destination pages to be re-reviewed.
Bottom line
TikTok Events API is how your TikTok campaigns learn from affiliate payouts that happen off your pages. The setup is a traffic source with ttclid as External ID Parameter, a pixel with Pixel Code and token, an event mapped on the campaign, and the network's postback pointed at your tracker. BATracker sends the Events API 2.0 payload with a stable event_id, retries on failure, and logs every send. The getting-started guide covers the domain, offer and campaign steps if you are new to the tracker.
