The advertising world took a hit when ad blockers started restricting ads’ ability to track user behaviour on different platforms. In a similar vein, Apple’s iOS 14+ release also introduced ATT (App Tracking Transparency), which limits your campaigns from offering more tailored ads to high-value audiences. 

TikTok ads also met a similar fate, with advertisers facing tracking inaccuracy and reduced ad effectiveness.

Stats showed a drop in ad spend on iOS, decreasing from 41% to 38% in April 2021. The bar only reduced further throughout the year, reaching 30% between July and October (before rebounding to 34% in April 2022). 

Seeing these dwindling numbers, TikTok’s API for Business took matters into its own hands and introduced the TikTok Conversion API. Also called the TikTok Events API (eAPI), it offers more accurate event tracking by following a server-to-server tracking method. 

How will this server-to-server tracking help you with your ads?

In this blog, we shall explore how tracking occurs, how the TikTok Events API integration takes place, and what measures you can take to ensure more accuracy in event measurements. 

Let’s get started. 

JUMP DIRECTLY TO HOW TO USE THE TIKTOK CONVERSION API.

Note: This blog will use Conversion API (CAPI) and Events API interchangeably. Events API falls under CAPI, as both of them are APIs for server-side tracking. In TikTok’s context, they mean the same.

What is the TikTok Conversion API (Events API)? 

Let’s explain the Conversion API (Events API) with an example- 

Suppose you have to send a physical mail to someone, but you are unable to due to roadblocks ahead. Instead, you opt for e-mail, which sends the same mail without having to face the roadblock. 

This way, you are able to send the mail by using plan B, the e-mail. Because there were roadblocks on the way, it was easier to send the mail like this. 

This is how server-side tracking happens with Conversion API. The physical way of sending the mail is through the pixel code, and using the email is via using the Conversion API (CAPI). 

Now, let’s look at it from a technical point of view: 

The TikTok Events API (or the Conversion API) uses server-side tracking, which means that instead of depending on TikTok Pixel, your server sends event data directly to TikTok’s servers.

These events include add to cart, page view, purchases, sign-ups, etc. You essentially add the CAPI to your Pixel code for the server-to-server flow to be established. 

This way, the data is bypassed from any ad blockers, Apple’s ATT restrictions, cookies and any other browser limitations, and sends the customer data (events) directly to TikTok’s server. 

Further Reading: How To Sell On TikTok – A Guide To Getting Started and TikTok Ads Example

How to Set Up TikTok Conversion API (TikTok Events API)?

Now that you have the basic understanding of the Conversion API, let’s delve into its setup. 

Prerequisites for TikTok Conversion API

Before you implement the Conversion API, it’s important to have the following already set up: 

  1. A TikTok Ads Manager account 
  2. TikTok Events Manager 
  3. TikTok Pixel code
  4. A TikTok Pixel ID 
  5. An Access Token from TikTok Business Centre 
  6. Understanding where to put the Pixel code in the website’s backend. 
  7. A third-party partner ecommerce platform like Shopify (if applicable; it is optional)
  8. Review TikTok Business Product Data Terms and TikTok Privacy Policy to understand data collection policies.
Important note: If you have not set up your TikTok Pixel, follow this guide on how to do so for Shopify stores. It involves all the methods for creating a Pixel code: through partner platform integration, manual installation, and third-party TikTok Pixel apps

Events API Integration 

The Event API can be implemented in two ways:

  • Using TikTok Pixel and Events API together
  • Adding Events API when Pixel is already set 

When you open Events Manager, here are the options you get: 

With TikTok Pixel involved, you will get browser-side and server-side data connections. When you opt only for the Events API, you only get an access token for the server-side data connection. 

Now, go for TikTok Pixel + Events API if you do not have the Pixel already set and are doing it from scratch.

Go with the Events API when you have the Pixel ready but want to add the API to the server. 

Let’s get down to the process and understand how to implement the API. 

TikTok Pixel + Events API 

  1. Go to Events Manager. You can even reach the Events Manager through Ads Manager by going to Tools > Events. 
  2. Next, select “Connect data source” at the top left corner and select “Web” as your data source:
  1. Next, enter your website’s URL to set up your business for event tracking: 
  1. You’ll be asked to choose between partner integration and manual setup. For this example, we will choose manual setup.

    When you choose the manual setup, you are asked to choose between the TikTok Pixel + Events API, TikTok Pixel or Events API setups. You can either set up the Events API with the pixel or separately. 

TikTok suggests setting up the Events API when you are adding the pixel code to the browser. It’s a hassle-free process that lets you share events from the browser and server in one go. Here’s what they have to say about using the Events API as the second channel instead of standalone integration: 

When you opt for TikTok Pixel + Events API, you must first create and add the pixel code to your website. This is explained in our guide on how to set up TikTok Pixel in different ways.

Important Tip: In manage configurations, to have more targeted event tracking, we recommend enabling Automatic Advanced Matching (AAM), which Tiktok also recommends. It tracks customer emails, phone number, name, address, and external ID. 

Now, we shall move to setting up events after setting up the pixel. 

Further Reading: Learn How Much Do TikTok Ads Cost. 

Setting up TikTok Events Builder

Launch the Event Builder to measure your website visitors’ actions. The TikTok Event Builder is a tool for setting up events and parameters on your website without a code snippet.

It suggests them based on the information provided on your web page and analyses them to suggest relevant events and parameters. 

The Event Builder helps configure standard website events and improves measurement, optimizing your campaigns for better performance. 

So, to launch it, enter your site’s URL and click “Launch Event Builder.”

Important Note: Ensure you have added the pixel code to your website’s editor. The Event Builder will not operate otherwise. 

This will add the events and parameters to your pixel code. Otherwise, you can manually do it by clicking “switch to custom code” for direct implementation. 

Choose the parameters you want to track and click “Next” to see the customized code which you can insert to any web page you wish to analyse. 

Next, verify the pixel setup. 

You can test it in “Test events” or install the TikTok Pixel Helper plugin. 

Implement Events API

Implementing the Events API can be done on your own or with the help of a developer. 

With this guide, you can also implement it yourself and learn the different terms and tools you need to understand to execute the API. 

First, ensure you have access to the server environment and developer resources. 

Let’s see how you can go about it:

Generate Access Token 

Access tokens are the gateway to managing access to any API. It grants the client application permission to perform or access any action on behalf of the person implementing the API. 

In the case of Events API, this token must be included with every API request.

Once your token is generated, be sure to copy and save it immediately. TikTok does not store access tokens for security reasons. 

Easily set up TikTok Pixel on your Shopify store with AdNabu’s TikTok Pixel app; all in just minutes!


Boost tracking accuracy, enhance ad performance, and drive more sales.

Send Events Through the API 

Here, you will send events from your server to TikTok’s server. This will inform TikTok about the event activities on your website, such as views on products, adding products to cart, purchasing, etc. 

The access token serves as the special key to prove to TikTok that the events are coming from your website.

For this server-to-server tracking, you must add different events (at least 3) for effective tracking. 

Now, this step talks about creating a POST request. It basically means you are posting/sending data to TikTok. And the data you share to the server is called the payload. 

A POST request is made on the server-side code of your website. Here’s an example of a POST request made using Node.js:

const axios = require('axios');

const sendTikTokEvent = async () => {

  const response = await axios.post(

    'https://business-api.tiktok.com/open_api/v1.3/event/track/',

    {

      pixel_code: 'YOUR_PIXEL_CODE',

      event: 'Purchase',

      timestamp: new Date().toISOString(),

      user: {

        external_id: 'hashed_user_id_or_email'

      },

      properties: {

        value: 59.99,

        currency: 'USD'

      }

    },

    {

      headers: {

        'Access-Token': 'YOUR_ACCESS_TOKEN',

        'Content-Type': 'application/json'

      }

    }

  );

  console.log(response.data);

};

Now, the data (payload) is being sent to TikTok’s API endpoint path, which informs the platform of the type of events coming from your website. 

This is the API endpoint path – /open_api/v1.3/event/track/

When it is combined with the base URL, you get the full endpoint – https://business-api.tiktok.com/open_api/v1.3/event/track/

Why is this important to understand? 

When your backend sends a POST request to the endpoint, TikTok receives the event, such as a “Purchase” or “AddToCart”. It then links that event to the user who engaged with your ad, helping to enhance ad targeting and provide more insightful reporting.

Here’s a sample JavaScript snippet that demonstrates this POST request with the full endpoint and the access token:

axios.post(

  'https://business-api.tiktok.com/open_api/v1.3/event/track/',

  {

    event: 'AddToCart',

    ...

  },

  {

    headers: {

      'Access-Token': 'YOUR_ACCESS_TOKEN_HERE',

      ...

    }

  }

)
Further Reading: 25+ Viral TikTok Trending Products You Can Sell.
Build a Payload

A payload is the actual data shared in a request between a client (you) and a server (TikTok). It’s formatted based on the API’s rules (usually in JSON or XML). It includes fields and values that carry the needed information.

In this part, you are essentially structuring the necessary data that TikTok should receive. 

It comprises the following elements:

  • Events [events] – The data to be tracked, such as AddToCart, Purchase, PageView, etc.
  • TikTok Pixel ID [pixel_code] – This helps TikTok associate the events with your ad account.
  • User data [user] – This comes in hashed form to preserve user information, such as email and phone number.
  • Time frame [timestamp] – The time a certain event took place. It is in the ISO 1801 format.
  • Properties [properties] – This contains extra information about the purchase, currency, etc. 

You can also use Payload Helper, a tool that builds the payload automatically. It avoids missing fields, reuses code for multiple events, and updates faster. 

Here’s a sample JSON snippet for building a payload: 

{

  "pixel_code": "YOUR_PIXEL_CODE_HERE",

  "event": "Purchase",

  "timestamp": "2025-09-26T14:25:30Z",

  "user": {

    "external_id": "hashed_email_or_user_id"

  },

  "properties": {

    "value": 99.99,

    "currency": "EUR"

  }

}

Here is the complete Sample payload with all the necessary fields (sourced from TikTok’s documentation): 

curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/event/track/' \

--header 'Access-Token: {{Access-Token}}' \

--header 'Content-Type: application/json' \

--data-raw '{

  "event_source": "web",

  "event_source_id": "{{PIXEL-CODE}}",

  "data": [

    {

      "event": "Purchase",

      "event_time": 1687758765,

      "event_id": "12345",

      "user": {

        "external_id": "user_12345678",

        "phone": "0c7e6a405862e402eb76a70f8a26fc732d07c32931e9fae9ab1582911d2e8a3b",

        "email": "123456405862e402eb76a70f8a26fc732d07c32931e9fae9ab1582911d2e8a3b",

        "ip": "123.456.789.1",

        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15",

        "locale": "en_US"

      },

      "properties": {

        "currency": "USD",

        "value": 200.0,

        "content_type": "product",

        "description": "some product decription",

        "contents": [

          {

            "price": 100.0,

            "quantity": 2,

            "content_id": "12345",

            "content_name": "Fancy-AirMax2.0 Black",

            "content_category": "Shoes - Running Shoes",

            "brand": "Fancy Sneakers"

          }

        ]

      }

    }

  ]

}'
What is an Events API Payload Converter? 
According to TikTok, the Events API Payload Converter makes integrating with the TikTok Events API easier by automatically transforming data from other platforms into the format TikTok requires. It minimises the amount of code needed to a few lines.

It saves development time and lets advertisers focus on improving their campaigns. Currently, it supports Meta’s Conversions API.
Further Reading:

10 TikTok Ad Examples that work.
How To Leverage TikTok Lookalike Audiences for Explosive Growth

Test and Verify Events API (eAPI)

After you integrate the Events API into your website’s server-side code, you can run a diagnostic test to verify whether the events are reaching TikTok’s servers and whether you are getting the desired outcomes. 

So, reach the final stage and click “Go to Test events” –

You will reach this page:

In that, choose server-side events (Events API). Then, do the following:

  • In your server’s payload, include the test_event_code parameter for the event you want to test.
  • Insert the test code into the test_event_code field.
  • Send the payload.
  • Next, open diagnostics in the next tab. 

Viewing and Managing Pixel Diagnostics in TikTok Events Manager

  • You can view diagnostic issues for all your pixels in one place.
  • Each diagnostic card gives a summary of:
    • The issue
    • Its severity
    • The affected dataset
    • Impacted ads
  • For many issues, you’ll see an action item to help you fix it directly.
    Example: If first-party cookies aren’t enabled, click Enable first-party cookies to start resolving it.
  • To remove an issue from your dashboard, click the three dots and select Dismiss.

To View Diagnostics for a Specific Pixel:

  1. Go to the TikTok Events Manager.
  2. Click on the pixel you want to review in the Datasets Overview section.
  3. Click the Diagnostics tab. If there’s a number next to the tab, it means there are active issues.
  4. Click Active issues to see all problems related to that specific pixel.
  5. The diagnostic cards here work the same as on the home page, by showing the issue, severity, affected dataset, and impacted ads.

Conclusion 

While it is a bit technical, implementing it can be done by either a TikTok merchant or a developer.

Understanding CAPI or Events API helps you improve your targeting capabilities and opens more doors for customer event tracking. This assures that you get more accurate data, helping you optimize your campaigns more effectively. 

With that, here are the key takeaways from the blog: 

  • The TikTok Conversion API (also called Events API) helps advertisers track user actions more accurately using server-to-server tracking.
  • It was introduced to counter the impact of ad blockers and Apple’s iOS 14+ ATT restrictions, which made browser-based tracking less reliable.
  • By sending events like AddToCart, Purchase, or PageView directly from your server to TikTok, you can bypass issues related to cookies, browsers, and privacy settings. This method leads to better ad targeting, measurement, and attribution.
  • You can use the Events API: Alongside TikTok Pixel (browser + server data) or as a standalone method if Pixel is already set up
  • To get started, you need: TikTok Ads Manager and Events Manager accounts, TikTok Pixel and Pixel ID, an Access Token from TikTok Business Center, basic understanding of where to place code in your website backend
  • TikTok also provides a tool called the Payload Converter to help format event data automatically, reducing development time.
  • After setup, you can test and verify your events using the Test Events feature in Events Manager.
  • The Diagnostics tab in Events Manager shows issues across all pixels, including: Issue type and severity, affected datasets and impacted ads and suggested fixes.

FAQs

Is TikTok API free?
TikTok’s API, including the Events API, is completely free to use. However, you must have a TikTok Ads Manager account and an active Pixel to access and implement it.

What does a conversion API do?
The Conversion API allows your server to send user activity (like purchases, sign-ups, or add-to-carts) directly to TikTok. This server-side tracking improves data accuracy and helps optimize your ad performance, especially when browser tracking is limited.

How to get TikTok API access token?
You can generate your access token inside TikTok Ads Manager. Go to Events Manager, select your Web Event or App Event setup, and create a new Access Token under the API integration settings.

How secure is the TikTok Conversion API?
TikTok’s Conversion API is secure and uses HTTPS for encrypted data transmission. It also supports hashing of sensitive user data (like emails and phone numbers) to protect user privacy and comply with data regulations.

What is a payload in TikTok Events API?
A payload is the structured data you send to TikTok’s server. It includes event details like event type (Purchase, AddToCart, etc.), timestamp, user identifiers (hashed), and any related values like price or currency.

What does a payload helper do?
A payload helper is a custom function in your server code that builds the event data (payload) for you. It makes sending events easier by automatically formatting the necessary fields every time an event is triggered.

Where do I send TikTok event data from?
You send event data from your backend server using a POST request to TikTok’s event tracking endpoint:
https://business-api.tiktok.com/open_api/v1.3/event/track/.
This sends data directly to TikTok when actions occur on your site or app.

Also Read:

Author

Hey there! I'm a SaaS-based content writer & specialize in writing technical & eCommerce blogs. I know the nitty-gritty of Shopify & selling on marketplaces like Instagram, Snapchat, Facebook & more. When I am not writing, I indulge in cooking & traveling!

Write A Comment