TikTok is the hottest social media app with over 1 billion monthly active users. That is why most marketers decide to bring it into their advertising strategies.
People use TikTok on their mobile phones more than anywhere else. For quite a while, only Facebook was talking about Apple’s recent privacy updates. Only this time, new iOS tracking restrictions will also apply to TikTok ads. Because of the iOS restriction, TikTok custom audiences and events do not include people who opted out of tracking in iOS 14.
How can you make TikTok tracking more accurate? The answer is server-side tracking. This article will describe how to set up the TikTok events API using Google Tag Manager.
TikTok events API is a server-side integration that allows you to send website or app events from your server directly to the TikTok server. It works similarly to the TikTok pixel. You can use TikTok events API to send conversion events, collect custom audiences, dynamic product ads, campaigns optimization.
TikTok API events have the same benefits and are very similar to ss tracking solutions from other platforms. Check our earlier posts about FB Conversion API, and server-side GA4.
Here are the main benefits of using TikTok events API:
1. Accurate event tracking. With server-side tracking, you will be able to collect more events. TikTok events API is resistant to ad blockers, ITPs, and other tracking restrictions. This way, you can increase the accuracy of conversion tracking of your campaigns. It will give you a better understanding of what campaigns are converting and bring more sales.
2. Better custom audience quality. Since tracking won’t be blocked, your custom audiences will include all users.
3. Data security. With server-side tracking, the personal information of your customers stays secure.
4. Privacy controls. Keep your marketing efforts intact with rapidly evolving privacy requirements that let you adapt what data you share and when you share it.
5. Enriched data. You can send additional data to TikTok, for example, from your CRM. Use this data to have a better understanding of campaign performance or building custom audiences.
Even though server-side tracking is a fantastic new technology, it has its disadvantages as well.
1. More complicated integration. SS tracking works in a slightly different way than browser tracking. That is why it may take quite some time to integrate it with your site. The best way to set up TikTok events API or ss tracking for any other platform is using the Google Tag Manager server container. BTW we can help.
2. It requires a cloud server and additional cost. To set up ss tracking, you will need to configure a cloud server that you will use to send requests to different data points.
3. It is still new. TikTok events API is a new technology, which means that we should expect more updates to come. That is why you’ll need to stay on top of all the upcoming changes.
TikTok events API works similarly to Facebook conversion API. TikTok uses Click ID and user data to match events with TikTok users. The more user data you send to TikTok, the higher the chances of attributing the events to their users. TikTok events API has the same features and browser events. It can be used to create audiences, measure conversions, and optimize TikTok algorithms.
Starting February 28, 2022, TikTok supports event deduplication. Meaning that now you can use both pixel and events API, similarly to Facebook CAPI. If you want to send events from both browser and server, ensure you add event_id.
Every time someone clicks on the TikTok ad, a Click ID (ttclid) is added to the URL. That is a unique identifier that is valid for 30 days. You can store the TikTok click ID (ttclid) and share it back to the TikTok events API that will help to attribute events to your campaigns.
To increase TikTok API events match quality score, you can send user data, such as email, phone number, user ID, user IP, and user agent. All user information should be transformed to lowercase and hashed using SHA256 on the client-side.
Besides user data, you can send properties, objects and event parameters.
There are two ways to set up the TikTok Events API: Events API Gateway and using the server GTM. In the section below, we consider both methods in detail.
Stape's TikTok Events API Gateway is the newest and simplest solution for implementing the TikTok Events API. It allows you to skip the complexities of configuring event deduplication and avoid spending excessive time on tagging. It allows you to send user parameters and events directly from the server while also supporting multiple Pixels in a single instance, even across different Business Manager accounts.
It works in minutes — set up the TikTok Events API without the need for manual server-side tagging implementation. With the TikTok eAPI Gateway, you can immediately enhance the accuracy of conversion tracking and attribution.
Stape’s TikTok Events API tag allows you to send website or app events from your server directly to the TikTok server. You can collect custom audiences, create dynamic product ads, and optimize campaigns.
It requires technical knowledge for setup and configuration, including managing infrastructure such as server hosting and permissions.
Key features of TikTok Events API tag setup:
Key features of TikTok Events API Gateway setup:
TikTok eAPI tag | TikTok eAPI Gateway | |
Setup complexity | More complex configuration, you need web and server GTM containers. | Easier to set up. |
Ability to set up server-side tracking for other platforms | More flexible, enabling setup for various platforms. | Setup is possible only for TikTok. |
Price | Depends on the number of requests, check the calculator to see the price for your website. | 10$/month for each Pixel or 100$/month for 100 Pixels. |
TikTok Events API tag suits best for:
TikTok Events API Gateway suits best for:
Before you begin, ensure that TikTok web tracking is already configured on your site, whether it's implemented through a GTM container, embedded directly in the website code, or integrated via a plugin. This setup allows you to use existing web events. |
1.1. Create an account or log in to Stape. Click on “Create Gateway” in the TikTok section.
1.2. Write in the gaps:
Click “Create TikTok Events API Gateway”.
1.3. Choose a subscription plan. Stape offers:
1.4. Wait till the status of your gateway is “Running”.
2.1. Click on “Finish TikTok Gateway setup”. You will be redirected to the login interface of TikTok Gateway.
2.2. In the Events API Gateway hub click on “View details” and then - “Connect Data Source”.
2.3. Choose the account and Pixels you’d like to connect and confirm your choices.
2.4. You will see the added pixel in your dashboard.
Using a custom domain in your TikTok Events API Gateway can improve measurement performance. It allows you to choose the subdomain for the Pixel's communication with the Events API Gateway. This custom domain should match the subdomain used for firing the TikTok Pixel.
3.1. Click “Settings” on the menu. Push the button “Set up domain”.
3.2. Choose domain and receive DNS records to configure.
3.3. Log in to your DNS provider and set records (if you use Cloudflare, the settings should look like on the screenshot).
3.4. And that’s it! You’ve successfully set up your subdomain.
This will help you increase the protection of your events from ad blockers.
After validating your Data routing domain you will see a link that you can use to download TikTok js on your site. Click on “View base code” and copy the snippet.
You can use a single TikTok Events API Gateway to set up multiple TikTok Pixels. Additionally, Pixels from various TikTok Business Accounts can be connected to the same Events API Gateway, provided you have admin access to all the Pixels.
The process is straightforward: configure your TikTok Events API Gateway, then add new Pixels through the hub interface. Simply click on “Connect data source”.
As mentioned before, TikTok Events Gateway uses web events to route them via the server.
6.1. Within 30 minutes of connecting your pixel to the TikTok eAPI Gateway hub, you should notice that the event count is no longer zero, and you should also see the names of the events that have been received.
6.2. You can also verify that events are sent correctly to the TikTok Events APIG hub by checking the website console:
Starting February 28, 2022, TikTok supports event deduplication
2. Send required data to the server container. We have blog posts that describe two methods: sending data using GA4 or using Data Tag.
3. Add TikTok events API tag from the GTM template gallery.
4. Generate Access Token. To do that click Assets -> Web Events -> Open pixel -> Click Settings -> Click "Generate Access Token".
5. Create a TikTok tag in the server container. Choose event -> Add TikTok API Access Token -> Add TikTok Pixel ID (You can only add a single Pixel ID per tag).
6. You can add event parameters under Server Event Data Override. These parameters include event ID, referrer, timestamp, and URL. Our tag will automatically add event parameters, but you can select to override and send it manually.
7. To send user data, open the user data section. Here you can add the IP address, user agent, email, external ID, and ttclid. Ip address, user agent and ttclid will be added automatically.
8. To send product data, use properties sections. You can send content, currency, description, query, and value.
9. Add trigger.
The TikTok events API allows sending data from your server to the TikTok app. You can use it to improve the accuracy of event tracking and expand the size of your custom audiences. The events API has the same abilities as browser tracking. Still, you’ll benefit from better privacy and performance due to its ability to bypass client-side limitations and have more accurate information about user behavior.
If you got any questions, just click Get assistance, fill up the form, and we will send you a quote.
Comments