Set Up Events API for Server-Side Tagging in Google Tag Manager

Last updated: May 2024

TikTok Events API is designed to give our advertisers a 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. Learn more about Events API.


Set up TikTok Events API with Google Tag Manager

If you're using Google Tag Manager (GTM) to manage tags for your website, you can add TikTok Pixel tags to your GTM containers to install TikTok Pixel and configure events sent to TikTok through both Pixel and Events API. The interactive setup flow for Google Tag Manager in TikTok Events Manager will guide you to configure and install necessary TikTok tags, triggers and variables. For detailed instructions and support for setting up TikTok Pixel and Events API with Google Tag Manager, please see our Developer Help Center.


The Google Tag Manager setup experience in TikTok Events Manager sets up both Pixel and Events API by default. Using both data connection types is recommended in order to maximize your event coverage and campaign performance.


To only set up Events API to send events to TikTok, you can uninstall the Pixel tags by deleting the "TikTok Pixel" and "Custom HTML" tags from the Web container used for integration. See more at our Developer Help Center.


Prerequisites

1. A Google Analytics account and familiarity with Google Analytics 4 (GA4).

2. A web container installed on your website and a server container created in your Google Tag Manager account.

3. Publish, Approve, Edit, and Read permissions of the web and server containers. Learn more about container permissions.

Set Up Events API for Server-Side Tagging in Google Tag Manager

4. A Google Cloud Platform (GCP) account and a GCP billing account for provisioning your tagging server. Learn more.

5. Familiarity with basic concepts such as tags, triggers, and variables and server-side tagging.


Deduplication

Event Deduplication is required for advertisers using both the TikTok Pixel and Events API to share duplicate copies of events, which report the exact conversion on their website.


If you use TikTok Events Manager's interactive flow to set up TikTok Pixel and Events API with Google Tag Manager, no additional configuration is required to deduplicate your events. An event_id variable is automatically configured during setup.


If you set up TikTok Pixel and Events API with Google Tag Manager but used a different method than the Events Manager setup flow, you can configure a custom javascript variable as your event_id to deduplicate events between TikTok Pixel and Events API events. Learn more about event deduplication for GTM Data layers.


Support

  • If you have any questions, please contact TikTok Ads Customer Support or reach out to your TikTok Sales Representative.

  • If you have any feature requests or encounter any issues, file an issue on GitHub here.