Vazante

Metrics and analysis

TikTok Events API: when it is worth implementing

What the TikTok Events API recovers, how deduplication with the pixel works, and the threshold for knowing whether the gain pays for the development.

Also available in: Português · Español

The TikTok Events API solves one specific problem: the event the pixel could not send. It is not a better version of the pixel, and implementing it without understanding the difference usually creates more problems than it solves.

What it solves

The pixel runs in the person's browser. That means it depends on the browser cooperating, and three things interfere:

  • Ad blockers, which stop the script from loading.
  • Browsers with tracking restrictions on by default.
  • Lost sessions: someone closes the tab before the confirmation page loads.

In all three, money came in and TikTok never knew. The effect is always the same: the platform shows fewer sales than the store made, cost per result looks worse than it is, and the campaign gets judged on an incomplete number.

The Events API sends the same event from the server, where none of that interferes.

Why it does not replace the pixel

A common temptation: if the server is more reliable, why not use only that?

Because the server knows what happened, and not how. The pixel carries browsing context — previous page, time on page, click sequence — that the server does not have. That context feeds remarketing audiences and improves attribution.

The correct design is both together: pixel for behavior, API to guarantee delivery of what matters. It is the same reasoning behind Meta's Conversions API.

Deduplication, which is the whole point

If both send the same event, TikTok needs to know it is one. That is what the event identifier does.

You generate a unique identifier for each action — an order number works well — and send the same value in the pixel event and in the API event. TikTok compares and discards the duplicate.

Without it, the result is predictable: the dashboard shows exactly double your real sales. ROAS looks excellent, someone raises the budget, and the bank account does not follow.

The short rule: do not turn on the API without the identifier working. One well-measured source beats two sources summed by accident. The base install is in TikTok pixel.

The threshold for implementing

It is not "sooner is better". It is arithmetic:

  1. Add up store sales in the last closed month.
  2. Add up TikTok conversions for the same period, same window.
  3. Calculate the gap as a percentage.

Under 20%: do not implement yet. That gap is attribution and organic sales, not lost events. You would add complexity with no gain.

Between 20% and 40%: worth it, if you have someone to do it. This is where most stores sit.

Above 40%: it is probably not browser blocking. It is a broken install, and the API does not fix a broken install — it replicates the problem through another path. Fix the pixel first.

The third case is the most important and the most ignored. Implementing an API on top of a broken pixel spends development to keep not measuring.

What to send, and what not to

The API accepts contact data to improve matching — email, phone, device advertising ID. Sending it improves attribution.

It is also a privacy decision, not only a technical one. The data needs to be hashed, you need a legal basis for the processing, and the data subject needs to have been informed. It is not a checkbox to tick without thinking.

The minimum that works with no personal data: event, value, currency, event ID and ad click ID. That already recovers most of what the browser lost. What to weigh is in AI data security in marketing, which covers the same kind of decision.

How to confirm it works

  1. Open the event debugger and filter by server origin.
  2. Place a test order and confirm the event arrives from both sources.
  3. Check the event identifier: both should carry the same value.
  4. Look at the day's total and compare against real orders.
  5. If the total is double, deduplication is not working. Stop and fix before running budget.

Step 5 sounds obvious and saves the most money on this list. One day of budget decided on a doubled number costs more than the week of development.

When the event gets rejected

The API responds with success and discards the event afterwards, which makes diagnosis annoying. The most common causes:

  1. Expired access token. It has a validity period and nobody warns you.
  2. Missing required parameter, usually currency or value.
  3. Wrong hash format on contact data.
  4. Timestamp outside the accepted window, on events sent with a long delay.

The panel has a diagnostics area showing rejections, and it is the first place to look. Almost nobody opens that tab before suspecting the code.

What the API does not solve

Worth setting the boundary, because expectations usually exceed what the tool delivers.

It does not solve declined consent. If someone refused marketing cookies, the legal basis is the same for both paths. Sending server-side does not route around a refusal, and anyone promising that is suggesting something you do not want to do.

It does not solve attribution. The gap between what TikTok credits and what Meta credits remains. The number gets more complete, not more comparable across platforms.

It does not solve the single ruler. Sales by source, with data from the sales team, remains the only place channels fit together.

The order of implementation that avoids rework

When the gap justifies the project, build order decides whether the first month produces usable data or a mess to untangle.

  1. Generate and store the event ID first. Before any API call. If your order system does not already have a stable unique identifier per transaction, that is the first thing to build, and everything else depends on it.
  2. Send the pixel event with that ID. Change the existing pixel call to carry it. Verify in the debugger that it appears.
  3. Only then add the server call, with the same ID.
  4. Run one day with both, checking totals hourly. Not weekly. Deduplication either works or doubles everything, and you want to know inside a day.
  5. Add contact data last, if you decided to send it, once the counts are correct.

Most teams do this in the opposite order: they build the server integration first, turn it on, and discover the duplication a week later after a budget decision was already made on doubled numbers.

The sequence above costs the same development hours and produces a correct number from the first day. The reading that catches a doubled count early is the weekly comparison in weekly ad report.

Where to start

Do the gap arithmetic before writing a line of code. If it is under 20%, your time returns more in creative than in instrumentation.

If it is above, implement with the event identifier from the first line, not later. And check the first day's total against real orders before letting budget run. The reporting routine that surfaces divergence early is on the paid media reporting page.

Frequently asked questions

Does the Events API replace the pixel?

No. They work together: the pixel captures browser behavior, the API guarantees the event arrives even when the browser blocks it. Swapping one for the other loses session context.

When is it worth implementing?

When the gap between store sales and TikTok conversions exceeds roughly 20% and you have already ruled out a broken install. Below that, the gain does not pay for the complexity.

What is event_id and why does it matter?

It is the identifier that lets TikTok recognize that the pixel event and the API event are the same one. Without it, the conversion is counted twice and your ROAS is inflated.

Do I need a developer?

Usually yes, unless your e-commerce platform has a native integration. It is not large work, but it is server code, not a panel setting.

Read next