TikTok Ads can drive cheap traffic, but I regularly see accounts where the TikTok Pixel reports a fraction of the orders or leads the business actually received. Smart Performance campaigns and value-based bidding then optimise on that thin, incomplete signal. The fix is the same pattern that works for Meta: run the TikTok Pixel in the browser, add the TikTok Events API on the server, and make sure the two are deduplicated and well matched.
In this guide I walk through how I set up both with Google Tag Manager (GTM) and server-side GTM, which events to send, how the ttclid click ID fits in, and how to check the result in TikTok Events Manager.
What is the TikTok Events API?
The TikTok Events API is TikTok's server-to-server connection for sending website, app and offline events directly from your server to TikTok, instead of relying only on the browser Pixel. It does the same job as the Meta Conversions API: when a browser blocks or loses a Pixel event, the server copy can still reach TikTok.
TikTok's recommended setup is to run both together:
| TikTok Pixel (browser) | TikTok Events API (server) | |
|---|---|---|
| Where it runs | Visitor's browser, via JavaScript | Your server or a server-side GTM container |
| Blocked by ad blockers | Often | Much less often |
Captures ttclid and _ttp |
Automatically | Only if you pass them in |
| Needs an access token | No | Yes, generated in Events Manager |
| Best for | Real-time browsing events, audiences | Purchases, leads and other high-value events |
The access token gives write access to your pixel, so it belongs in your server container or backend only. Never paste it into website code or a web GTM tag.
Which TikTok standard events should you send?
You should send the standard events that map to your real funnel, with the most important conversion configured as the optimisation event in your campaigns. TikTok uses standard event names to understand what each event means, so I avoid custom names for anything I plan to optimise on.
A typical mapping I use:
| Business action | TikTok standard event | GA4 equivalent |
|---|---|---|
| Product page view | ViewContent |
view_item |
| Add to cart | AddToCart |
add_to_cart |
| Checkout started | InitiateCheckout |
begin_checkout |
| Payment info added | AddPaymentInfo |
add_payment_info |
| Order completed | Purchase (formerly CompletePayment) |
purchase |
| Lead form submitted | Lead (formerly SubmitForm) |
generate_lead |
| Account created | CompleteRegistration |
sign_up |
What happened to CompletePayment and SubmitForm?
TikTok updated its standard events and renamed CompletePayment to Purchase and SubmitForm to Lead. TikTok has said the older names continue to work, so an existing setup does not break, but for a new build I use the current names. Do not send both the old and new name for the same action, because that creates two separate events instead of one. TikTok has also flagged a few events, such as PlaceAnOrder and ClickButton, for gradual retirement, so check the current list in TikTok's help centre before you rely on them.
For Purchase, always include value, currency and content_id (or a contents array). Value-based optimisation and catalogue ads need them.
How do you set up the TikTok Pixel with GTM?
You set up the TikTok Pixel in GTM by installing a TikTok Pixel tag template from the Community Template Gallery and firing it on your existing dataLayer events. If you already have a clean GA4 ecommerce dataLayer, most of the work is mapping.
- In TikTok Ads Manager, open Events Manager, create a web pixel and choose manual setup (or the GTM partner option).
- In web GTM, add the TikTok Pixel template from the gallery. TikTok publishes its own template, and there are well-maintained community versions.
- Create a base tag that loads the pixel on all pages (after consent where required).
- Create one event tag per standard event, triggered by the matching dataLayer event (
add_to_cart→AddToCart,purchase→Purchase). - Map value, currency and product IDs from dataLayer variables.
- Add an event ID to every tag. More on this below.
If your dataLayer is incomplete, my GA4 dataLayer generator gives you the ecommerce push format to ask your developer for, and my GA4 enhanced ecommerce checklist covers what each event needs.
Advanced matching in the browser
Advanced matching sends customer details such as email, phone number and an external ID with your events so TikTok can match them to TikTok users. In the browser, the pixel can collect these through the identify call:
ttq.identify({
email: 'customer@example.com',
phone_number: '+8801XXXXXXXXX',
external_id: 'cust_20931'
});
The TikTok pixel library hashes these values with SHA-256 before sending them, or you can pass values you have already hashed. Use a consistent format: lowercase, trimmed emails and phone numbers with the country code. Only send this data when you have consent to do so.
How do you send events through the Events API with server-side GTM?
You send TikTok Events API events from server-side GTM by forwarding your web events to the server container and firing a TikTok Events API tag there. This is the route I use most, because one server container can feed GA4, Google Ads, Meta and TikTok from the same event stream. If server-side GTM is new to you, start with what server-side tracking is.
The setup on Stape or Google Cloud:
- Make sure your server container runs on a custom first-party subdomain, such as
sst.yourstore.com. - In web GTM, send your events (usually through the GA4 tag) to the server container URL, including the event ID, user data and the TikTok cookies as event parameters.
- In the server container, install a TikTok Events API tag template. Stape maintains a popular one, and TikTok offers its own.
- Enter your pixel code and access token, and map the event name, value, currency and contents.
- Map user data: hashed email and phone, external ID, IP address, user agent,
ttclidand_ttp. - Trigger each server tag on the matching GA4 client event.
Stape also offers a hosted TikTok Events API gateway, and platforms like Shopify have a TikTok sales channel app that can send server events itself. Those are fine options. The only rule is to pick one server route per pixel, or you will double-count.
Why ttclid and _ttp matter
The ttclid is the click ID TikTok adds to your landing page URL when someone clicks an ad. _ttp is the first-party cookie the pixel sets to recognise the browser. Together they are among the strongest signals for tying a conversion back to an ad click.
The browser pixel reads them automatically. The Events API does not, so you need to capture them in the browser and pass them to the server. Two common ways to lose ttclid:
- A redirect, link shortener or page builder drops URL parameters before the pixel loads.
- The conversion happens days later and nothing stored the click ID.
Test a real ad URL with my click ID checker to make sure ttclid survives to the final landing page. For lead businesses, I store ttclid in a hidden form field so it is saved with the lead in the CRM.
How does TikTok deduplicate Pixel and Events API events?
TikTok deduplicates Pixel and Events API events when both carry the same event name and the same event_id. When TikTok recognises two events as duplicates within its deduplication window, it keeps one for measurement and reporting.
In practice:
- Purchase: use the order ID as the event ID (for example
order_10482), so the browser and server share it naturally. - Lead: use the form submission ID, or generate one ID in the browser and send it to both.
- Upper-funnel events: generate a unique ID in the browser, push it into the dataLayer, and pass the same value to the pixel tag and the server tag.
If an Events API event arrives without an event ID, TikTok can fall back to matching on _ttp, which is another reason to send that cookie. I still never rely on the fallback. The same mistakes I describe in my Meta CAPI event deduplication guide apply here: IDs generated separately on each side, mismatched event names, or two server integrations firing on the same pixel.
How do you test your setup in TikTok Events Manager?
You test your setup in TikTok Events Manager using the Test Events tool, then confirm over the following days in the Overview and Diagnostics views that events arrive from both sources, deduplicate and carry good match data.
My checklist before I hand over a TikTok build:
- Install the TikTok Pixel Helper browser extension and confirm each browser event fires once with the right parameters.
- In Test Events, use the test event code on server tags, run a full journey and confirm both browser and server events appear.
- Open each test event and check that the event ID matches on both versions.
- Remove the test event code from the server tag afterwards, so live events are not treated as test traffic.
- Check GTM Preview mode for the web and server containers to see
ttclid,_ttpand user data reaching the server tag. - After a few days, review Diagnostics for warnings about missing parameters, deduplication or invalid values.
- Compare TikTok purchases or leads with real orders or CRM leads for the same period.
Events Manager also shows how well your events are matched to TikTok users. If it is low, the cause is usually missing email, phone or external ID on server events, or ttclid and _ttp not being forwarded.
Final thoughts
A reliable TikTok setup is the Pixel and the Events API working together, with one shared event ID per action and the click data passed through to the server. Get those three things right and TikTok's bidding has far better data to work with. If you want a second pair of eyes on your setup, see my advanced conversion tracking service or book a free tracking audit.

