Setting up TikTok Events API in Google Tag Manager
For the TikTok Events API to work, you must first configure a server container. Visit this blog to find out how to set this up.
In the first blog of the TikTok implementation series, we showed how to install the TikTok Pixel via Google Tag Manager, Client Side. Now that all events are sent via the TikTok Pixel Client Side, we want to send the events that are missed (due to browser blocking and ad blockers) Server Side. This can be done with the TikTok Events API. But how do you set it up? We'll show you in this blog.
With TikTok, things work a little differently than with other tags. You send both client side (TikTok Pixel) and server side (Events API) data to the platform. Through Event Deduplication, TikTok can distinguish the unique requests and collect as much data as possible.
Steps TikTok Server Side implementation
Events you can measure with TikTok Events API
- ViewContent
- ClickButton
- Search
- AddToWishlist
- AddToCart
- InitiateCheckout
- AddPaymentInfo
- CompletePayment
- PlaceAnOrder
- Contact
- Download
- SubmitForm
- CompleteRegistration
- Subscribe
Setting up TikTok Events API in Google Tag Manager
Select TikTok Pixel
First, we will select the TikTok Pixel. Go to Tools → Events → Web Events and then select the TikTok Pixel.
TikTok Events API Access Token Generation
Next, go to Settings and scroll down until you see Access Token Generation. Click on Generate Access Token.
Go to Server Container Google Tag Manager
Set up the TikTok Events API in the GTM Server Container.
Create Tag
Go to Tags and click on New.
Tag Configuration
Give the tag a name, such as TikTok - Events API, and click Tag Configuration. Next, select TikTok Events API (Official).
Setting up TikTok Events API Tag
Paste the Access Token you generated in step 2 under Access Token. Next, enter your TikTok Pixel ID. Not created and installed a TikTok Pixel yet? Then visit this blog.
Tag Triggering
Once the tag is set, we choose the trigger, or the time when the tag is fired. In this case, we want the tag to forward all GA4 events to TikTok. To forward all GA4 events, choose the GA4 Client Trigger. Don't have this trigger set up yet? Then check out this blog.
The TikTok Events API is now set up. The TikTok events are now measured Server Side. Currently, TikTok does not yet distinguish between events from the pixel (Client Side) and from the Events API (Server Side). To get these duplicate measurements out, you can use TikTok Event Deduplication. This is the next and final step in the TikTok implementation series.