Are you running ads on TikTok?
As one of the most downloaded apps in the world in recent years, TikTok has become one of the largest social media platforms with audiences spanning over 150 countries.
Running ads here allows you to reach more customers and drive traffic to your business.
If you want to bring your marketing strategy to the next level, you should measure your advertising efforts to understand which ads are generating the most conversions.
This allows you to define your perfect audience and target your ads to them.
Be at the top of your measuring game and set up TikTok event tracking for deeper business insights.
We’ll show you how to configure it easily using Google Tag Manager so that you can stay ahead of the competition and drive more engagements and sales.
Here is an overview of the steps we need to take to set up TikTok event tracking:
- Setup Requirements
- Configuration in TikTok Ads Manager
- Create Your TikTok Pixel
- Create TikTok Events
- Create a Tag
- Test Your Implementation
Let’s dive in!
To set up TikTok event tracking, there are a few things you need to have first.
First, you need a TikTok Ads Manager account.
Next, you’ll need to determine what events you’d want to track. For this example, we’ll be looking at the contact page of our website.
Specifically, we want to track every time a user clicks on the phone number and email. We also want to count them as a single contact event.
Lastly, you’ll need a Google Tag Manager account and have GTM implemented on your website.
If you don’t know how to set up Google Tag Manager on your website, check out our Google Tag Manager Tutorial for Beginners, where we lay down the steps for you to follow along easily.
Configuration in TikTok Ads Manager
After you have all those setup requirements prepared, the first step to setting up TikTok event tracking on your website is to configure events in your TikTok ads manager.
Go to your ads manager and click on Assets → Events.
In the events manager, we can track events that happen on your app or website.
Since we’ll be tracking the contact page on our website, select Manage under Web Events.
Here, we’re prompted to install a TikTok pixel first.
Similar to building a house, we need to lay the foundation first before we can start construction. For TikTok event tracking, the TikTok pixel is our foundation.
We have to install our base, the main pixel, first and then create our events.
Create Your TikTok Pixel
So, step number one is to create our pixel.
Click on Create Pixel.
We are given two options for how to connect your website to TikTok: the TikTok pixel and Events API. With the TikTok pixel, the implementation is straightforward with step-by-step setup instructions.
Meanwhile, the TikTok events API allows you to send web events from your server directly to TikTok. You’ll have more control over what you share and when you share information, but you must have a server. Moreover, technical development resources are required.
In this lesson, we won’t deal with the events API and instead create a TikTok pixel.
🚨 Note: If you want to learn more about how server-side tagging works, check out our guides on GTM server-side tagging and Cloudflare Zaraz server-side tagging.
To provide a name for our pixel, select the TikTok Pixel, then click Next.
Next, we have the option of installing the pixel code manually or setting up web events with the TikTok pixel automatically. Either option will work perfectly fine since we are working with Google Tag Manager.
If you want to set it up automatically, select Automatically Set Up Web Events via Partner Platforms → Next.
Next, you’ll have to choose Google Tag Manager. For this tutorial, however, we’ll show the steps to manually install the code, so click Back.
Let’s select Manually Install Pixel Code → Next.
Coming up are the event builder and the custom code options for the event setup method. Because we want to implement our events via Google Tag Manager and prefer having control over our tracking, we’ll be selecting the custom code option.
Now, don’t think that you need to know how to code here. You don’t have to be a developer because we’ll look at a great solution later.
Select Custom Code → Next.
Our TikTok pixel has now been created. Here, we’re given instructions on how to proceed, starting with installing the pixel code.
The steps we’ll show will differ slightly (particularly in step 2 – pasting the code to the header section of your website) because we’ll be using Google Tag Manager to install our code.
Install Your TikTok Pixel via GTM
First, copy the pixel code either by clicking on the code itself or the Copy Pixel Code button.
Go to Google Tag Manager → Tags → New.
Next, we’ll select the Tag Configuration.
Choose the Custom HTML tag type.
Paste the code in the HTML section, then click on Triggering.
The question is when should our tag fire? Since the snippet must be installed on each page of the website, our tag should fire on All Pages.
Finally, provide a name for our tag, then click Save.
So, this was step one for setting up TikTok event tracking, our foundation, which is installing the TikTok pixel. Now, it’s time to create our events.
Create TikTok Events
To start, let’s go back to the events manager and click Next.
Here, we are prompted to follow code instructions to create events. Click on the View Instructions button to be directed to the TikTok documentation page.
Here, we can see various pieces of information regarding the supported standard events and the parameters you can send along with them.
In our case, we want to track whenever a visitor wants to contact our business.
In our list of standard events, we can see the event type, its description, the event code to use, and recommended parameters.
What if you’re not experienced with coding and would rather not deal with it? Don’t worry because we have a workaround that makes this step much easier.
To do this, we have to go back to Google Tag Manager.
Configure GTM Variables
Before we do any implementation, we need to configure the built-in variables available to our GTM container.
Go to Variables → Configure.
Now ensure that all the click-based variables are activated by selecting each one.
Next, let’s go on and create a trigger.
Create a Trigger
For this TikTok event tracking example, we want to track whenever a visitor clicks on either our phone number or email address links. Let’s first create a generic trigger for link clicks.
Go to Triggers → New.
Select Trigger Configuration → Just Links under clicks.
For now, let’s write All Links for the trigger name. We’ll change this later when we make the trigger more specific to our use case. Next, click Save.
Let’s test if we are seeing our click variables when we click on the links on our contact page.
Click on Preview.
Next, click Connect to confirm connecting the Tag Assistant to your website.
Let’s go to the contact page and click on both the phone number and the email.
Let’s go to the Tag Assistant to check if our trigger works and if our variables get populated properly. We should have two subsequent link-click events at the top.
Start with the first Link Click event, number 14, and go to the Variables tab. The Click URL variable should have the text “tel:” followed by our phone number.
Next, go the event number 15, the second Link Click. Our Click URL variable this time would have “mailto:” followed by our email address.
Now we were able to define our trigger specifically to our needs.
Go back to Google Tag Manager and select the All Links trigger we have already configured.
Instead of all link clicks, we only want our trigger to fire on the conditions we specify. In this case, we only want it to trigger when the user clicks on the link to call or message us.
Click on our Trigger configuration and select Some Link Clicks. Set the “Click URL contains tel:” as the condition.
Change the name for this trigger, then click Save.
Next, let’s create a second trigger for email link clicks.
Click on New.
Our trigger configuration should mostly be the same as our telephone link clicks trigger. Our trigger type remains Just Links, and the condition should also be for Click URLs.
The difference is that this time, the Click URL should contain “mailto:” Name this trigger and click Save.
Our triggers are now ready to be used. The next step will be for setting up our tags. We looked at the documentation earlier and saw the equivalent event code for each event type. What should we do if we don’t want to deal with code?
Add a Template to Your Workspace
In our case, Templates come to the rescue.
Go to Templates → Search Gallery for the tag templates.
Look for TikTok and select the TikTok Pixel official template by TikTok.
Click on Add to Workspace.
Since this template is from the community gallery, a window opens showing all the permissions you need to confirm to use the tag template.
Click on Add to proceed.
Our tag template is now ready to be used. We’re now ready to define our tags.
Create a Tag
Let’s go to Tags → New.
Select Tag Configuration → TikTok Pixel.
To set up TikTok event tracking with GTM, we will need our Pixel ID.
Go back to our TikTok Ads Manager and click on Complete Setup.
We can then see our Pixel ID in the upper left corner of the window. Copy this value.
Go back to Google Tag Manager and paste the Pixel ID in the space provided. Next, select Contact for our trigger event.
Here, we can see all the different events we can implement for TikTok event tracking. All the events we saw in the official documentation are available to use here.
We’ll skip the advanced matching configurations for now, and take things one step at a time. For this tutorial, we’ll only set up an event without any parameters.
Let us know if you want to have a look at dynamic values in our upcoming lessons.
Go to Object Properties and select No Contents.
Next, click on Triggering to set our trigger.
We have already made a trigger for both telephone and email link clicks. These can be seen in the trigger list that comes up.
Select either one of these triggers. To add the other trigger, simply click on the + button for the firing triggers.
If you add multiple firing triggers, you’ll notice that it is set to the OR condition, meaning the tag will fire for either trigger. Provide a name for the tag, then Save it.
The last thing we need to do to complete our TikTok event tracking setup is to test out our tag.
Test Your Implementation
Before we begin testing, we’ll install the extension called TikTok Pixel Helper.
This extension helps you verify and troubleshoot pixel installation by checking for errors and providing implementation recommendations for your website. Using this extension will help in our TikTok event tracking.
💡 Top Tip: If you want to know about more Chrome extensions that can be helpful to you as a marketer, check out our definitive list of the 11 Essential Analytics Chrome Extensions.
Select this extension in the Chrome Web Store and click Add to Chrome.
Confirm installation by clicking on Add extension.
To access it more easily, go to your extensions and pin the TikTok Pixel Helper.
The TikTok Pixel Helper extension icon should show up in our toolbar.
Let’s go back to Google Tag Manager and click on Preview again.
Once again, go to the Contact page and click on the links to both our phone number and email address. Similar to our test earlier, our latest events should be two link clicks.
Click on the first Link Click event and confirm that our TikTok event tag has been fired successfully.
We should also check the second Link Click event to confirm that our email address link click trigger works. If it is working correctly, our TikTok event tag should also show under tags fired.
This is a good sign that we’ve set up our events correctly. As another layer of assurance, let’s go back to our website and have a look at the pixel helper.
Click on the TikTok Pixel Helper extension. Here, we have the base pixel Page View and two Contact events. Click on one to expand. Notice that a warning message shows up.
This notification tells us that the content ID received contains no value. Should we be worried that we got this message?
If you remember, we selected the no contents option in the Google Tag Manager. We intentionally sent this event without any parameters yet, so for now, this is perfectly fine. If you’re following along and you see this message, you can just ignore this warning.
Our event tag seems to be working properly. Let’s go back to GTM and publish our tags live on our website.
Click on Submit.
Add a version name, then click Publish.
The final and most definite test to see if our TikTok event tracking is working correctly is to go back to our TikTok events manager and see if our events are being tracked there,
Don’t worry if you’re not seeing events here immediately. It might take a while for your events to be recorded, but seeing your events here is the most definite confirmation that you’ve successfully implemented TikTok event tracking.
Great! So, those are the steps to create your TikTok event tracking setup. We started with creating a TikTok Pixel, then made a TikTok base pixel tag in GTM, set up our triggers specific to our use case, and then used the tag template to create the event tag.
If you want to be notified of errors on your website, check out our guide on How to Receive Slack Notifications for 404 Errors on your Website.
We hope you managed to set up your TikTok event tracking correctly. What events would you track on your website? Do you have any specific TikTok pixel setup topics you want us to discuss? Let us know in the comments below!