- TikTok Ads
- Events API
- Tracking
- Conversions
- Server-side
TikTok Pixel and Events API Setup Guide
By Dolphin Analytics team · Published 11 Sept 2026
TL;DR
The TikTok Pixel tracks conversions from the browser; the Events API sends the same events from your server, so ad blockers and iOS limits can't quietly drop them. Run both, share one event_id per conversion so TikTok deduplicates the two copies, and send advanced matching data so events tie to a person. We wire up paid-channel conversion tracking for agency and in-house clients most weeks.
Olamide Sule, founder of Dolphin Analytics: a digital analytics expert based in London delivering tracking and measurement work for agency and in-house clients.
You added the TikTok Pixel, the events show green in Events Manager, and yet the conversions TikTok claims don’t match what your store recorded. Either TikTok reports far more sales than the till, or purchases you know happened never show up. This is the setup we’d give a client in that spot: how the Pixel and the Events API differ, the exact steps to wire both up, and the two faults (deduplication and matching) that make a “working” setup report the wrong numbers.
We set conversion tracking up across paid channels, Google Ads, Meta, LinkedIn and TikTok, for agencies and marketing teams most weeks, so the focus here is the implementation detail the quick-start guides skip.
What is the TikTok Pixel, and what is the Events API?
The TikTok Pixel is a piece of JavaScript on your website that reports visitor actions to TikTok from the browser: page views, add-to-carts, checkouts and purchases. The Events API sends the same actions server-to-server from your own backend instead. TikTok’s own guidance is to run both together and deduplicate the overlap, so each source covers the other’s blind spots.
The reason you need both is signal loss. A browser event can be blocked by an ad blocker, stripped by tracking-prevention settings, or dropped when a shopper clears cookies, so the Pixel alone under-counts. A server event sidesteps all of that, because nothing on the device can block a call your backend makes directly to TikTok. The catch is that a server event TikTok can’t match to a person, or can’t tell apart from the Pixel’s copy, is worth nothing. That is where most setups quietly fail.
How do you set up the TikTok Pixel?
Set up the Pixel in Events Manager, then confirm it fires before you trust a single number. The exact path:
-
In TikTok Ads Manager, open Assets > Events, then under Web Events click Manage (or Set Up Web Event if this is your first one).
-
Choose the TikTok Pixel connection method, then pick how to install it: manually install the code, a partner platform (Shopify, WooCommerce), or Google Tag Manager.
-
For a manual install, paste the base pixel code into the
<head>of every page. It loads TikTok’s library and fires a page view:<script> // TikTok's minified loader assigns window.ttq, then: ttq.load('YOUR_PIXEL_ID'); ttq.page(); </script> -
Fire a conversion event at the moment it happens. For a purchase, that is
CompletePaymentwith a value and currency:ttq.track('CompletePayment', { contents: [{ content_id: 'SKU_123', content_type: 'product', content_name: 'Annual box' }], value: 49.99, currency: 'GBP', event_id: 'order_10482' // reuse this exact id on the server event });
The event_id on that last line is the part people miss, and it decides
whether the Events API double-counts your numbers or matches them. More on
that below.
Which TikTok standard events should you send?
Send TikTok’s named standard events, not custom labels, so the platform can optimise and report against them. TikTok recognises a fixed set; using the exact names is what lets Ads Manager build a purchase or lead column. The ones most stores and lead-gen sites need:
| Standard event | Fires when | Key parameters |
|---|---|---|
ViewContent | A product or key page loads | content_id, content_type |
AddToCart | An item is added to the basket | content_id, value, currency |
InitiateCheckout | Checkout begins | value, currency |
AddPaymentInfo | Payment details are entered | value, currency |
CompletePayment | A purchase completes | value, currency, contents |
CompleteRegistration | A sign-up finishes | content_name |
SubmitForm | A lead form is submitted | content_name |
Always attach a value and currency to revenue events. Without them TikTok
can count that a purchase happened but can’t optimise towards higher-value
orders, so the campaign chases volume instead of revenue.
How do you set up the TikTok Events API?
Generate an access token, then have your server post events to TikTok’s endpoint. The steps:
-
In Events Manager, open your web event set, go to Settings, find the Events API section and click Generate Access Token. TikTok shows the token once, so store it in your secrets manager, not in client-side code.
-
From your server, send a
POSTtohttps://business-api.tiktok.com/open_api/v1.3/event/track/with the token in theAccess-Tokenheader. -
Build the payload so each event carries the pixel ID, the event name, a timestamp, the shared
event_id, and auserobject with hashed identifiers:{ "event_source": "web", "event_source_id": "YOUR_PIXEL_ID", "data": [{ "event": "CompletePayment", "event_time": 1757592000, "event_id": "order_10482", "user": { "email": "<sha256-hashed-email>", "phone": "<sha256-hashed-phone>", "ttclid": "<captured-from-the-ttclid-url-param>", "ttp": "<the-_ttp-first-party-cookie>" }, "properties": { "value": 49.99, "currency": "GBP" } }] }
The event_id here is order_10482, the same value the browser Pixel sent for
that sale. That single detail is what makes deduplication work.
Event deduplication: sharing one event_id across the Pixel and Events API
Deduplication is how TikTok recognises the browser copy and the server copy of
one sale as the same conversion and keeps a single count. TikTok pairs them
when both carry the same event_id and the same event name,
per its documentation.
Miss the shared ID and the two copies drift apart.
The rule is short and easy to break: generate the event_id once, when the
conversion happens, and hand the same value to both the browser Pixel and the
server call. A common mistake is letting each side mint its own ID, so TikTok
sees two different events and counts the sale twice. When we audit a paid
account and find TikTok claiming far more purchases than the store, a missing
shared event_id is one of the first things we check, because it inflates
every revenue event at once.
Advanced matching: why events arrive and still miss
Advanced matching is how well TikTok can tie an event to a real person using
the customer data you send. A server event with only a value and no identifiers
reaches TikTok and then gets dropped from attribution, because TikTok can’t
work out who it belongs to. Every Events API call should carry hashed email and
phone (SHA-256), plus the ttclid click identifier from the ad click and the
_ttp first-party cookie the Pixel sets.
Server events often match worse than the Pixel’s, because the browser collects
cookies and the click ID automatically while your server has to be told to
capture and forward them. Grab ttclid from the landing-page URL parameter on
first visit, store it, and pass it on every later server event for that user.
Hash email and phone before they leave your infrastructure, never after.
How do you verify the TikTok Pixel and Events API?
Verify with two tools before trusting any figure: the Pixel Helper for the browser side, and Test Events for both. The steps:
- Install the
TikTok Pixel Helper
Chrome extension, load your site, and confirm it detects your pixel ID and
that
CompletePaymentfires with avalueandcurrency. - Open the Test Events tab in Events Manager and complete a real action. You should see the browser copy and, once the Events API is live, the server copy of the same event.
- Check that TikTok marks the pair as deduplicated. If both a browser and
a server copy show but nothing is deduplicated, your
event_idis not shared and TikTok is double-counting.
Green ticks in Events Manager mean events are arriving. They do not mean the events are matched, deduplicated, or reconciled against real orders. Those are separate checks.
Why TikTok Ads Manager still over-reports sales
Worth saying plainly, because a clean install invites false confidence: even a perfect Pixel and Events API setup can leave TikTok Ads Manager claiming more sales than your store confirms. TikTok credits view-through conversions, counting people who saw an ad but never clicked, and fills tracking gaps with modelled estimates. Neither reflects a last-click order in your commerce platform.
So there are two different jobs here. Clean signal, getting the events to TikTok and matched, is what the Pixel and Events API deliver. Honest attribution, knowing which sales your ads actually drove, comes only from reconciling TikTok’s claimed conversions against last-click orders in Shopify or GA4. It’s the same pattern we cover in why Meta ads over-report conversions, and it applies to every self-reporting ad platform, TikTok included.
How we set up TikTok tracking for clients
Dolphin Analytics wires up TikTok conversion tracking as part of a wider paid-channel setup, so the Pixel, the Events API, Google Ads and Meta all send clean, deduplicated events and get reconciled against the store. Here is what that looked like on one engagement.
For a children's subscription brand we took attribution confidence from zero to 100%, cut customer acquisition cost by 20%, recovered 30% of the Facebook conversions iOS privacy changes had hidden, and automated 10+ hours a week of reporting.
The same server-side recovery work applies to TikTok.
If your TikTok numbers look off and you can’t tell whether it’s a deduplication fault, weak matching, or TikTok doing what TikTok does, start with a free scan of what’s firing on your site using Sonar, our tracking checker. If you’d rather talk it through, tell us what’s broken, or book a call. Clean signal is the start; numbers you can spend against are the point. For the server-side detail behind all of this, our guide to Meta CAPI setup walks through deduplication and match quality on the Meta side.
Frequently asked
What is the TikTok Pixel?
The TikTok Pixel is a snippet of JavaScript you add to your website that reports visitor actions back to TikTok: page views, add-to-carts, checkouts and purchases. It runs in the browser, so TikTok can attribute those actions to the ads people saw and optimise campaigns towards the ones that convert. Because it lives in the browser, ad blockers, cookie restrictions and iOS privacy settings can drop some of its events before they reach TikTok, which is why TikTok also offers the server-side Events API.
What is the difference between the TikTok Pixel and the Events API?
The TikTok Pixel sends events from the visitor's browser; the Events API sends them server-to-server from your own backend. The Pixel is quick to install and captures on-page context, but it loses events to ad blockers and browser privacy limits. The Events API is harder to set up and catches the events the browser drops, because nothing on the device can block a server call. TikTok's guidance is to run both and deduplicate the overlap, not to pick one.
How do I set up the TikTok Events API?
Open Events Manager, select your web event set, go to Settings and generate an Events API access token (TikTok shows it once, so store it safely). Your server then sends a POST request to TikTok's event track endpoint carrying the pixel ID, the event name, an event_time, a shared event_id, and a user object with hashed email, hashed phone and the ttclid click identifier. Send the same event_id the browser Pixel used for that conversion so TikTok pairs the two.
Why does TikTok report more conversions than my store?
TikTok Ads Manager counts view-through conversions (people who saw an ad but never clicked) and fills gaps with modelled estimates, so its total can run well above the orders your Shopify or GA4 records confirm. Deduplication faults make it worse: if the Pixel and Events API send a sale without a shared event_id, TikTok can count it twice. Cleaner setup helps, but the only figure you can plan spend against comes from reconciling TikTok's claimed conversions against last-click orders in your commerce platform.
Do I still need the TikTok Pixel if I use the Events API?
Yes. TikTok recommends running the Pixel and the Events API together and deduplicating the overlap, not switching the Pixel off. The browser Pixel captures signals the server can't see easily, like the _ttp cookie and on-page behaviour, and the Events API catches the events the browser loses to blockers and privacy limits. Turning the Pixel off usually lowers match quality and makes reporting worse, not cleaner.
How do I check the TikTok Pixel is firing?
Install the TikTok Pixel Helper Chrome extension, load your site, and confirm the pixel ID is detected and that events like CompletePayment fire with a value and currency. Then open the Test Events tab in Events Manager and trigger a real action: you should see both the browser copy and, if the Events API is live, the server copy, with TikTok marking them as deduplicated. Green in Events Manager alone is not proof the numbers are right.