TikTok Ads Integration

Server-side Events API forwarding for TikTok ads.

Prerequisites#

  • TikTok Ads Manager account
  • TikTok pixel created in Events Manager

Setup#

  1. In TikTok Ads Manager → Assets → Events → Web Events → copy the Pixel Code.
  2. In TikTok for Business → Marketing API → generate a long-lived access token.
  3. 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 EventTikTok Event
installLead
purchase / INITIAL_PURCHASE / RENEWALPurchase
sign_upCompleteRegistration
start_trial / qualified_trialStartTrial
subscribeSubscribe
add_to_cartAddToCart
initiate_checkoutInitiateCheckout
searchSearch
view_contentViewContent

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.