How to Set Up the TikTok Events API

TikTok's browser pixel loses a lot of events. Here is how to run the Events API alongside it with correct deduplication.

TikTok’s audience is the most mobile, most in app and most ad blocked audience you will buy. Which means the browser pixel loses more events on TikTok than on almost any other platform.

The Events API fixes most of that. It is well documented, it works, and it is worth a morning of setup if TikTok is a real line in your budget.

Why the pixel alone underperforms here

Three reasons stack up.

  • Traffic lands in TikTok’s in app browser, which behaves differently to Safari or Chrome and restricts storage more aggressively.

  • The audience skews toward devices and settings where tracking prevention is on by default.

  • Sessions are short and often interrupted, so a purchase two hours later frequently lands with no pixel context.

The practical effect is that TikTok often reports fewer conversions than it actually drove, and gets cut from budgets for the wrong reason.

What the Events API is

A server to server endpoint. Your server sends conversion events directly to TikTok, with hashed customer data for matching, instead of relying on the browser to do it.

You run it alongside the pixel rather than instead of it. Events sent from both sides get deduplicated using a shared event ID.

Getting the credentials

  1. TikTok Ads Manager, then Assets, then Events, then Web Events.

  2. Select your pixel, or create one.

  3. Open the Events API setup and generate an access token. Store it securely, because it is a credential that can write to your ad account.

  4. Note your pixel ID. You need both.

The events to send

TikTok uses standard event names. Send the ones that match your funnel:

  • ViewContent for product or key page views

  • AddToCart

  • InitiateCheckout

  • CompletePayment for purchases, with value and currency

  • SubmitForm or CompleteRegistration for lead generation

Use TikTok’s standard names rather than custom ones wherever a standard name fits. Custom events cannot be used for some optimisation goals, which is an annoying thing to discover after launch.

Matching data, which decides everything

Like every platform, TikTok matches your server events to users with identifiers. Send as many as you legitimately have.

  • ttclid. The TikTok click ID, appended to your landing page URL. Capture it and store it. This is the strongest single signal.

  • _ttp cookie. TikTok’s browser identifier. Read it and pass it with the event.

  • Hashed email and phone. SHA256, lowercased and trimmed, phone in E.164.

  • IP address and user agent. Pass through from the original request, not your server’s own.

That last point catches people out. If your server sends its own IP and user agent, every event looks like it came from a data centre in Virginia and match quality collapses.

Deduplication

Generate one event ID per conversion and send it from both the pixel and the API.

It must be the same string on both sides. The usual approach is to use your order ID, or a generated UUID stored with the order.

Get this wrong and every purchase counts twice, your reported ROAS doubles, and you scale a campaign based on a number that is not real. This is the single most important implementation detail.

Two ways to build it

Server side GTM

If you already run a server side container, TikTok has a tag template for it. You forward your existing events and the tag handles the API call.

This is by far the easiest route if the infrastructure exists, and it means TikTok becomes one more destination rather than a new project: feeding every ad platform from one server container.

Direct from your backend

Your application posts to the TikTok endpoint when an order completes. More control, no extra infrastructure, needs a developer.

Good choice if you have a single conversion event and a capable backend.

Testing

TikTok’s Events Manager has a test events tab. Use it before you go live.

Send a test event with a test code, confirm it appears, then check three things: the event name is what you expected, the value and currency are present, and the matching parameters are being received.

Then place a real test order and confirm it appears once, not twice. If it appears twice, your event IDs do not match.

Reading the diagnostics

TikTok reports an event match quality score, similar to Meta’s. It is the fastest way to tell whether your matching data is landing.

If the score is low, work through the list in order: is ttclid being captured, is the IP being passed through from the original request, is email being hashed correctly with no whitespace.

Nine times out of ten it is one of those three.

What to expect afterwards

Reported conversions usually go up, sometimes substantially, because you are now capturing events the pixel was losing.

Give the campaigns two weeks. TikTok’s optimisation needs to relearn with the fuller signal, and early performance during that period is not representative.

And do compare against your actual order count in your store. If TikTok reported conversions jump by more than your real orders did, you have a deduplication problem rather than a recovery.

Need this built properly?

TikTok loses more browser events than most platforms, which makes server side a bigger win here. I set up and repair tracking for ecommerce stores and lead generation businesses, so the numbers in your ad accounts match the money in your bank account.

Have a look at what I do, or book a call and we can go through your setup together.

Need accurate tracking?

Its Free

500+ Happy Clients ⭐️

Keep Reading

See exactly where you’re wasting ad spend and how better tracking can double your sales.

See exactly where you’re wasting ad spend and how better tracking can double your sales.

Tracking in 3 Hours

Tracking in 3 Hours

I Manage Everything

I Manage Everything

24/7 Expert Support

24/7 Expert Support

TESTIMONIALS

Trusted by 500+ satisfied clients

Discover how we’ve driven growth and innovation.

500+ Tracking

500+ Tracking

Adélaïde De Vos

3,922 followers

I had the pleasure to work with Abdul and I can say that he exceeded my expectations. He was professional, patient, and clear in his explanations and committed to client satisfaction. If you're looking for someone who is not only highly skilled but also reliable and committed to client satisfaction, I highly recommend Kayium!

Dean Watson

1,030 followers

Kayium setup our tracking for Google Ads and Meta Ads, which helped us get 20%+ more conversions on the same ad spend. He didn’t just handle the technical setup,he also took the time to explain why it works and how it improves results. If you’re looking for someone skilled, reliable, and committed to delivering real results, I highly recommend him!

David Friend

CEO: Profitable Sites

Kayium set up accurate tracking that helped us scale ads fast and boost conversions by over 25%. He gave us clear insight into which ads drive revenue.

Lalita Sundari

7,924 followers

I've worked with Kayium; his strategic mindset and expertise in GTM, GA4, Pixel & Server Side Tracking, are invaluable! I highly recommend Kayium!