Table of contents

How do you set up TikTok Event Deduplication?

TikTok-Event-Deduplication-set-up

The TikTok Events API is a game-changer in online marketing. It bypasses pixel-blocking problems caused by ad-blockers and improves the reliability of your data. When you measure TikTok data on both the client side and the server side, some events may be measured twice. TikTok would like to distinguish between events coming from the TikTok Pixel and those coming from the TikTok Events API, in order to achieve purer data analysis. Therefore, TikTok has introduced a "Unique Event ID. In this article, we explain how to apply TikTok event deduplication by setting it up in Google Tag Manager.

Also check out the entire TikTok Server Side Tracking Set Up.

TikTok Event Deduplication Scenarios

ScenarioAction
Overlap between Pixel eventsEvents are deduplicated that are shared through the Pixel, with the same event and event_id parameters, arriving within a 48-hour window from the first event.
Overlap between Events API eventsEvents are deduplicated that are shared via the Events API, with the same event and event_id parameters, arriving within a 48-hour window from the first event.
Overlap between Pixel and Events API events.Events shared by both the Pixel and the Events API are merged, if they have identical event and event_id parameters arriving within 5 minutes of each other, and additional match keys and parameters are added to the first event if applicable. Then, events that are deduplicated after 5 minutes and within a time frame of 48 hours from the first event are shared by both the Pixel and Events API, if they have identical event and event_id parameters.

TikTok Event Deduplication set up.

Set up TikTok Event Deduplication in Google Tag Manager (Client and Server Side).

Step 1: Create Variable (Web Container)

Default-workspace-webcontainer-variables

First, set up the required variable before you can proceed with configuration. In the Web Container (Client Side), go to Variables and click New. Have you already created this variable, for example when setting up Meta Event Deduplication? Then go directly to step 3.

Step 2: Set Variable (Web Container)

create-unique-event-id-variable-gtm-webcontainer

Click Variable Configuration and select Discover more tag types in the Community Template Gallery. Add the Unique Event ID variable to the workspace. Name the variable Event ID and save it.

Step 3: Select TikTok pixels (Web Container)

select tiktok pixel web container gtm

Go to Tags within the Web Container and click on the TikTok Pixel. Not set up a TikTok Pixel yet? Then check out this blog.

Step 4: Template (Web Container)

tiktok-event-deduplication-template-tiktok-pixel-gtm

Did you use a Template for your TikTok Pixel? Then go to the TagDe-duplication Configurations → Add the created Variable.

Step 5: Custom HTML (Web Container)

custom-html-tiktok-pixel-event-deduplication-gtm

Are you using Custom HTML for your TikTok Pixel? Then add your created Variable to the code. By default, TikTok includes all pageviews as events; you don't need to add them separately like Facebook. Successful? Click Save. Make sure:
ttq.page();ttq.page;

Step 6: GA4 Google Tag setup (Web Container)

google-tag-ga4-configuration-event-deduplication

Are you using a Custom HTML for your TikTok Pixel? Then add the created Variable to the code. By default, TikTok includes all pageviews as events, you don't need to add them separately like Facebook. Successful? Click on Save. Change the code from ttq.page(); to ttq.page;.

Step 7: Create Variable (Server Container)

create-new-variable-gtm-server-container

Go to your Server ContainerVariables and click New.

Step 8: Set Variable (Server Container)

setup-event-id-server-container-gtm

Give the Variable the name Event ID. Next, click Variable Configuration and select Event Data. Under Key Path, enter event_id and save the Variable.

Step 9: Select TikTok Events API (Server Container).

ga4-trigger

Go to Tags and select the TikTok Events API.

Step 10: Set up TikTok Events API (Server Container).

adding-event-id-to-tiktok-events-api-gtm-server-container

Within the Tag, go to De-duplication Configurations and add the created Event ID variable. Next, save the Server Container by putting it live.

TikTok Event Deduplication Testing

To check if your deduplication worked properly and how many events were duplicated, navigate to your pixel's detail page.

  • The"Browser" metric shows the unique events received only through Pixel SDK.
  • The"Server" metric shows the unique events received only via Events API.
  • The"Server & Browser" metric shows the unique events of both Events API and Pixel SDK after deduplication. If this metric is too low, check your deduplication implementation and make sure the event_id is identical between Pixel SDK and Events API.
validate-tiktok-event-deduplication

Outro

This was it. Your first TikTok Server Side Tracking implementation! You have now completed the entire TikTok implementation sequence, nice going! From now on, all TikTok events are measured and deduplicated both client side and server side.

About the author

Recently published

magnifiercrossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram