TikTok
CLItrail sends each attributed install to the TikTok Events API as a web event with the visitor's TikTok click and browser IDs.
#Set it up
#Generate an access token
In TikTok Ads Manager, open Events Manager, choose your web pixel and open its Settings to generate an Events API access token. Only the Admin and Operator roles can generate one.
#Add the destination
Enter the pixel code and the access token. The install event defaults to
Download, TikTok's standard event for a download from your website; the first run defaults toCLIFirstRun. Custom event names are reported but cannot be optimised for. Optionally add a value and currency.#Send a test event
Copy the code from Events Manager → your pixel → Test events → Test server events.
#Go live
Confirm TikTok's terms and your notice duties, and verify your domain first.
#What is sent
{
"event_source": "web",
"event_source_id": "YOUR_PIXEL_CODE",
"data": [{
"event": "Download",
"event_time": 1790172131,
"event_id": "clt_f399d6357f61bcf15f9370c69a41662457de8a05",
"user": {
"external_id":
"a68e7a64d91bfe305bd5c2a9f285ca38dec72a8a0d4036ee28a92bc72fb773ac",
"ttclid": "YOUR_TTCLID",
"ttp": "YOUR_TTP_COOKIE"
},
"page": {
"url": "https://acme.dev/docs/install",
"referrer": "https://acme.dev/"
},
"properties": { "value": 1, "currency": "USD" }
}]
}
- The access token goes in the
Access-Tokenheader. The body is JSON, the only format TikTok accepts. event_sourceisweb, the only source that accepts TikTok click and cookie IDs.page.urlis the page of the touch that supplied the ID.ttclidandttpare sent as captured, each chosen by the attribution policy; attclidre-read from TikTok's cookie is dated by when the SDK saw it land.external_idis a SHA-256 hash of a pseudonymous installation ID.- An install needs
ttclidorttpon a touch; otherwise nothing is sent to TikTok. - TikTok can report errors with HTTP 200, so only a response with
code0 counts as submitted, and such an error is shown asTikTok error <code>, never as a 200. - TikTok deduplicates on the pixel, event name and
event_idfor 48 hours, and retries stop there. Throttling and system errors wait 5 minutes.