TikTok Ads Integration
Server-side Events API forwarding for TikTok ads.
Prerequisites#
- TikTok Ads Manager account
- TikTok pixel created in Events Manager
Setup#
- In TikTok Ads Manager → Assets → Events → Web Events → copy the Pixel Code.
- In TikTok for Business → Marketing API → generate a long-lived access token.
- Enter the Pixel Code and Access Token in the AppRefer dashboard → Settings → Integrations → TikTok → Save.
How It Works#
The ttclid is captured from the tracking link click and stored on the attribution record. When an event occurs, AppRefer forwards it to TikTok's Events API:
TikTok Events API Endpoint
POST business-api.tiktok.com/open_api/v1.3/event/track/The ttclid is sent in the context.ad.callback field of the request payload, which TikTok uses to match the conversion back to the original ad click.
Event Mapping#
| AppRefer Event | TikTok Event |
|---|---|
| install | Lead |
| purchase / INITIAL_PURCHASE / RENEWAL | Purchase |
| sign_up | CompleteRegistration |
| start_trial / qualified_trial | StartTrial |
| subscribe | Subscribe |
| add_to_cart | AddToCart |
| initiate_checkout | InitiateCheckout |
| search | Search |
| view_content | ViewContent |
ttclid Required
TikTok conversions require a ttclid captured from the tracking link. Make sure your TikTok ad campaign URLs include the ttclid parameter via the
__CLICKID__ macro.