Connections
Connect TikTok Events API
Step by step: copy your TikTok pixel ID, create an Events API access token on the pixel, paste both on Tracking and send a test event.
Updated
Before you start
Once connected, LatchPay's server tells TikTok about every checkout, payment attempt and purchase, next to the TikTok pixel in the buyer's browser. TikTok counts each one once. This helps TikTok see purchases the browser missed. Server-side tracking explains what is sent.
- You need the Admin or Operator role on the TikTok ad account that owns the pixel. A token only works for pixels of that same ad account.
- In LatchPay, open Settings → Tracking for the right store: ids and tokens are saved per store.
- It takes about five minutes. Keep LatchPay and TikTok open in two browser tabs.
Connect TikTok, step by step
Open TikTok Ads Manager
Open TikTok Ads Manager and log in. Open TikTok Ads Manager
Open Events Manager
In the top menu, click Tools, then Events Manager.
Choose your pixel
Click the web pixel your Shopify store uses.
Copy the pixel ID
Copy the pixel ID shown with the pixel’s name. It is about 20 capital letters and digits, usually starting with C.
Paste the pixel ID
Paste it into Pixel ID on the TikTok card in LatchPay.
Create an access token
Back in TikTok, open the pixel’s Settings tab and click Generate Access Token. An access token is a long code that works like a password: it lets LatchPay send your checkout events to this pixel.
Copy the token
Copy the token TikTok shows.
Paste the token
Paste it into Events API access token on the TikTok card.
Only if another app sends purchases
Skip this unless an app such as WeTracked or TrackBee sends your purchases to TikTok. Then turn on Another app already sends purchases to TikTok, so no order counts twice (TrackBee: see Do you use WeTracked or TrackBee? first).
Save
Click Save. The card now says Pixel + server.
LatchPay stores the token encrypted and only ever shows its last four characters. To replace it, paste a new one and click Save.
Send a test event
Open Test Events
In TikTok, open the pixel’s Test Events tab.
Copy the test code
Copy the test event code under Test Server Events.
Send the test event
Paste it into Test event code on the TikTok card and click Send test event.
What you should see: Within a minute an event named LatchPayTest shows up in the Test Events tab. It has no value and never counts as a purchase.
After your next order
- The pixel's Overview in TikTok lists InitiateCheckout, AddPaymentInfo and Purchase with the connection method "Server & Browser", each counted once.
- The TikTok card on Tracking shows when LatchPay last sent an event, and Failed · 7 days stays at 0.
The purchase is Purchase
LatchPay sends the purchase as Purchase, TikTok's current name for it, from both the browser and the server, so TikTok counts it once. LatchPay used to send it as CompletePayment, the older name; TikTok turns that name into Purchase itself, so a campaign that optimises for completed payments keeps counting.
If something is wrong
If it does not work: The token was made on a pixel of another ad account: create it on the Settings tab of the pixel whose ID you pasted. Or you cannot create a token: you need the Admin or Operator role on that ad account, so ask its admin.
- The TikTok token was refused. Create a new token on the pixel's Settings tab and paste it; waiting events are sent within minutes.
- This token cannot send events to this pixel code. The token was made for a pixel of another ad account. Create it on the same pixel whose ID you pasted.
- Remove on the card deletes the token: server events stop and the browser pixel keeps running.