TikTok Pixel & Events API

Report your funnel events to TikTok Events Manager, from the browser and from Purchasely's servers, to optimize TikTok Ads campaigns.

The TikTok integration sends your funnel events to a pixel in TikTok Events Manager. The TikTok Pixel reports events from the visitor's browser; the Events API reports purchases again from Purchasely's servers, so a conversion is never lost to an ad blocker or an in-app browser. Both are configured from the same screen in the Console.

Purchasely eventTikTok eventBrowserServer
Page ViewPageviewYes—
Screen ViewedViewContentYes—
Purchase TappedInitiateCheckoutYes—
PurchaseCompletePayment, with value and currencyYesYes, when an access token is set

Browser and server copies of a purchase share the same event ID, so TikTok deduplicates them. In TikTok Ads Manager, CompletePayment is the event to optimize purchase campaigns on.

1. Create a pixel and get the Pixel ID and access token

TikTok creates the pixel and its Events API token in one guided setup. You need an advertiser account in TikTok Ads Manager.

  1. Open TikTok Events Manager and click Connect data source.
TikTok Events Manager: Connect data source
  1. Select Web and continue. When asked for your website URL, click Skip.
TikTok Events Manager: connect data source, Web
TikTok Events Manager: skip adding the website
  1. Choose Manual setup, then TikTok Pixel + Events API.
TikTok Events Manager: manual setup
TikTok Events Manager: TikTok Pixel + Events API
  1. Name the pixel after your app and create it.
TikTok Events Manager: name the pixel
  1. Under Install base code, click Next without installing anything: Purchasely loads the pixel on your funnels. Keep the defaults under Manage configurations.
TikTok Events Manager: install base code, skip
TikTok Events Manager: manage configurations
  1. Under Set up events, click switch to custom code and add the events Initiate Checkout and Complete Payment (add View Content if you want it). Keep the predefined parameters.
TikTok Events Manager: switch to custom code
TikTok Events Manager: select the events
  1. Click Next under Implement event code and under Testing without doing anything: Purchasely already fires these events.
TikTok Events Manager: implement event code, skip
TikTok Events Manager: verify pixel setup, skip
  1. Under Implement Events API, click Generate access token. The page now shows both your Pixel ID and your access token. Keep it open.
TikTok Events Manager: generate access token
TikTok Events Manager: Pixel ID and access token

2. Enter the Pixel ID and token in the Console

  1. In Web2App → Setup, section 4. External integrations, open TikTok Pixel.
  2. Enable the integration, paste the Pixel ID and the token into Conversions API Access Token.
  3. In the Front events tab, keep the four events enabled, or disable the ones you do not want to send.
  4. Save.
Purchasely Console: TikTok Pixel integration with Pixel ID and access token
  1. Back in TikTok, click Next then Finish. TikTok may flag the setup as incomplete until it receives a first event.
TikTok Events Manager: finish the setup

3. Check that events arrive

  1. Open the sandbox URL of a Web Flow, browse a few screens and complete a purchase with a Stripe test card.
  2. In Events Manager, open your pixel. The overview shows the events received, split between browser and server.
TikTok Events Manager: events overview with browser and server events

You can also use the Test events tab of the pixel: paste your sandbox URL, click Open website and interact with the funnel to see events appear live.

Troubleshooting

ProblemCause and solution
No event appears in Events Manager.Check the Pixel ID and that the integration is enabled in the Console, then reload the funnel.
CompletePayment appears only from the browser.The access token is missing or was regenerated in TikTok. Paste the current token in the Console.
Purchases from in-app browsers are missing.Configure the Events API access token: server events do not depend on the browser.

What’s Next

Did this page help you?