About Events API
Last updated, October 2023

TikTok for Business offers tools that allow businesses to share the events on their website with TikTok. TikTok Events API is designed to give our advertisers a more reliable connection between TikTok and advertiser marketing data (servers, website, app, or CRM) while also providing the flexibility for advertisers to customize the information they share with TikTok. Sharing these events with TikTok helps marketing teams measure ad performance on TikTok, optimize ad delivery, and create target audiences.


As part of our best practices, we recommend having an Events API integration that compliments your existing Pixel integration. Please note that Pixel or Events API set-up is a pre-requisite for our Web Conversions objective in TikTok Ads Manager. We recommend leveraging both solutions together to adapt to the changing ads ecosystem and maximize performance benefits.


Learn more about how to get started with the Events API.


Benefits of Events API

Events API provides businesses the opportunity to have a sustainable campaign set-up and adapt to the changing ads ecosystem, by allowing unobstructed marketing data sharing between your business and TikTok to reach your marketing objectives. Benefits of implementing TikTok’s Events API include:

  • ​Improve ad delivery and targeting by capturing missing conversions

    • Conversions reported via Pixel may be impacted due to connectivity issues and inconsistencies in how various browsers operate. When implemented with the Events API, more conversions will be reported and leveraged to better inform measurement, optimization, and targeting.

  • ​​Granular control over the data your business shares with TikTok

    • Your Events API integration will give you more control to only share the data required to meet your marketing objectives enabled by TikTok’s optimization products.

  • Enables resilient solutions as advertising ecosystems evolves

    • TikTok Events API builds a dependable connection between the advertiser's business and the TikTok platform, ensuring a more sustainable transition in response to changes in the advertising industry. By incorporating the Events API with an existing Pixel, advertisers are better positioned for changes in the industry while keeping their current campaign strategies and set-up in place.


Compare Web Conversion Setup Methods

There are three ways to set up Web Conversion with TikTok, by utilizing Pixel, Events API, or both. Please see below the benefits of these setup scenarios:

Events API

Pixel

Pixel + Events API (RECOMMENDED)

Benefits

- Enables more sustainable event sharing between your business and TikTok.

- Improves ad delivery and targeting by capturing missed conversions

- More control over what data your business shares with kTok.

- Lightweight implementation.

- Easy customer event capture and reporting.

- Automatic updates to pixel performance included.

- Events API enriches conversions shared by Pixel.

- Enriched conversions enhances full-funnel measurement, ad delivery, and audience creation.

- Enables sustainable transition to ad industry changes.

Time to Implement 

- Direct API implementation can take between 1-4 weeks.

- Commerce & Data Partner integrations will vary by partner. It can be less than 1 hour.

- Manual Pixel code implementation often takes a few minutes

- Integration with 3rd party Pixel partners may vary. Often can take less than a few minutes.

-Similar to the Events API implementation, with additional time to set up event deduplication.

Resources Needed

- For Direct API: Advertisers may need to resource in-house developers, martech teams, ad operations, or others with technical expertise.

- For Commerce & Data partners: Additional support may be provided by partners and will vary by partner.

- In-house developers, martech teams, ad operations, or others with website coding expertise.

- For Commerce & Data partners: Additional support may be provided by partners and will vary by partner.

- For Direct API: Advertisers may need to resource in-house developers, martech teams, ad operations, or others with technical expertise.

- For Commerce & Data partners: Additional support may be provided by partners and will vary by partner.

Event Deduplication is required for advertisers using both Pixel and Events API. Advertisers should share duplicate events through Events API and Pixel for deduplication. Learn more about how Event Deduplication works.


Events API Best Practices

Using Events API with TikTok Pixel

The TikTok Pixel and Events API are designed to be compatible. We recommend our advertisers who are looking to optimize towards web conversions to leverage the TikTok Pixel and Events API together to maximize performance.


For performance benefits, we recommend the following setup for all web conversion clients:

  • Connection Type: Use both TikTok's Pixel and Events API together with Event Deduplication (enabled through passback of event_id via parameter on both Pixel and Events API) Learn more about deduplication here.

  • Events & Parameters: Ensure that events throughout your user journey are shared consistently across your Pixel and Events API setup.

  • Match Keys: All relevant match keys are passed back to increase match rates for improved measurement and audience creation.


Setting up Events and Parameters with Events API

Before integrating with the Events API, we recommend predefining which Events you are interested in sharing with TikTok to achieve your marketing objectives. This includes 14 standardized and custom events which can be used to report and measure actions taken on your website. When setting up Events API, it is recommended to mirror your Pixel setup. Sharing the same events, parameters, and match keys through both the Events API and TikTok Pixel will allow for more accurate deduplication, thereby improving measurement, campaign performance, and audience creation.


For additional information on choosing events, please visit our section on Standard and Custom Events.


Matching Events with Events API

To measure the impact of your campaigns and attribute the actions that took place on a website to ads on TikTok, we recommend enabling the following match keys:

  • Click ID

  • Advanced Matching:

    • Email (hashing required)

    • Phone (hashing required)

  • External ID (hashing required)

  • IP Address and User Agent

  • 1st Party Cookie (for businesses using 1st Party Cookies with their Pixel)


Match Key

Description

Additional information

Click ID

- Click ID is a unique identifier appended to the URL every time a person clicks on a TikTok ad. Once the website is loaded, Click IDs can be stored and shared back to TikTok when an event occurs.

- Click IDs are unique and adhere to the same CTA window as configured in your Attribution Manager settings (see here).

For developer information on implementing Click ID, please defer here for more details.

Advanced Matching

- Advanced Matching enables businesses to send match keys (hashed email and phone) to better match website and app Events with ads on TikTok.

Details on Advanced Matching, including Frequently Asked Questions around hashing can be found here.

External IDs

- External IDs are advertiser-side identifiers, such as loyalty membership IDs, advertiser customer IDs, and external cookie IDs.

Details on External IDs can be found here.

IP Address (IP) and User Agent (UA)

- IP Address and User Agent parameters are end-user device and connectivity information. IP Address and User Agent are shared by default for Pixel and require manual configuration for Events API.

Details on IP Address and User Agent enablement for Events API can be found here.

1st Party Cookie

- First-party cookies are unique identifiers saved in the ttp first-party cookie and limited to the advertiser's domain. The value of this cookie is used to enhance the matching of advertiser website Events to ads on TikTok.

Details on how to share first-party cookie values with Events API are available here.

Learn More about Privacy and Data Usage

To learn more about how this information is used, please read TikTok Business Products (Data) Terms.


Learn more about how TikTok honors users' in-app and device-level privacy settings by accessing our Safety Center.


Event Deduplication

Event Deduplication is required for advertisers using both Pixel and Events API. We recommend advertisers follow our best practices by sharing the same events and parameters through both Pixel and Events API for more accurate deduplication.


How Deduplication Works

IMPORTANT: To ensure deduplication takes place, advertisers will need to share Event ID (event_id) as a parameter across their events through both Pixel and Events API. Please defer to our developer documentation for further guidance. If TikTok recognizes that events overlap and are duplicates of each other, we will record the first event received for measurement and reporting.


Deduplication Scenarios

Please refer to the following scenarios and subsequent actions when an overlap occurs between the following:

  • Overlapping between Pixel events.

    • We deduplicate any events shared through the Pixel, with the identical event and event_id parameters arriving within a 48-hour window from the first event.

  • Overlap between Events API events.

    • We deduplicate any events shared through the Events API, with the identical event and event_id parameters arriving within a 48-hour window from the first event.

  • Overlap between Pixel and Events API events.

    • We merge events shared by the Pixel and Events API events with the identical event and event_id parameters arriving within 5 minutes of each other and merge extra match keys and parameters into the first event if applicable.

    • We deduplicate subsequent events shared by the Pixel and Events API events with the identical event and event_id parameters arriving after 5 minutes and within a 48-hour window from the first event.


How To Set-up Deduplication

Developers must ensure the following three parameters are included in the event payload for deduplication via both Pixel and Events API:

  • pixel id

  • event (for example, CompletePayment or AddToCart)

  • event_id (a unique string chosen by the advertiser to represent visitor conversion)

Please follow TikTok For Business Developers' documentation on ways to set up deduplication.


Learn More about Privacy and Data Usage

To learn more about how this information is used, please read TikTok Business Products (Data) Terms.


Learn more about how TikTok honors users' in-app and device-level privacy settings by accessing our Safety Center.

Content