Return arrow
Leadsie Blog

What is a TikTok Pixel and How to Install it? A Step-by-Step Guide for 2024

If you want return on investment for your TikTok ads count you need to know how to use a TikTok pixel. Get all the inside info you need on setting up and optimizing a TikTok pixel. 👾

Nina Lelidou
January 29, 2024
5 min. read
Article Content
What is a TikTok Pixel?
Why should you use a TikTok Pixel? 3 Reasons to set it up
How can agencies benefit from a TikTok pixel
A comparison: TikTok Pixel vs Facebook Pixel
How to set up a TikTok pixel code in minutes
How to install TikTok Pixel
How to get access to your clients’ TikTok accounts
Final thoughts

Are you on the lookout for more ways to upgrade your TikTok advertising game?

No need to look further!

With over 1.6 billion users, TikTok ads have the ability to reach 1.081 billion adults over the age of 18, making TikTok a powerful marketing tool that can successfully increase business engagement.

In the world of advertising, TikTok Pixel is a small piece of code that can truly unlock your agency’s potential to produce the best results for your clients.

With better targeting and higher conversion rates, incorporating TikTok Pixel into your marketing campaign will make you stand out from competitors in no time!

In this article, we will explore what a TikTok pixel actually is, why it’s a must for marketing agencies and how to install it in just a few minutes. 😎🙌

First things first...what is a TikTok Pixel?

To put it simply, a TikTok Pixel is an HTML code snippet that measures the effectiveness of ads on the platform. 

As a tracking tool, it works by monitoring user actions, also known as events, which can ultimately inform your advertising strategy.

There are 13 types of TikTok Pixel events:

  1. Add payment information
  2. Add to cart
  3. Add to Wishlist
  4. Click button 
  5. Complete payment
  6. Complete registration
  7. Contact
  8. Download
  9. Initiate checkout
  10. Search
  11. Submit form
  12. Subscribe
  13. View content

Each event type corresponds to a distinct action a user may take. 

i.e. If someone searches for one of your products, it will trigger the ‘Search’ event.

But this is not where the magic ends!

Why should you use a TikTok Pixel? 3 Reasons to set it up

The triggering of an event causes the pixel code to collect data about the user and their interaction, which can then be used to provide you with useful insights to do the following:

1. Build your audience

One of the key functions of TikTok Pixel is audience customization. Based on the user data gathered by triggered events, you have the ability to create custom audiences.

For instance, visitors of a particular product page can be placed in one category.

As a result, each custom group can receive more personalized ads, making advertising efforts more precise. 

2. Optimize your ad campaign

Following on from custom audience building, the ability for more targeted advertising means that TikTok can fine-tune your ad campaigns by only displaying ads to relevant users- particularly those with a higher likelihood of triggering TikTok Pixel events such as subscribing.

3. Retarget

Utilizing the collected data, installing TikTok Pixel can help you set up retargeting campaigns. These display ads to users who have previously interacted with your website but didn’t complete a desired action such as making a payment. 

i.e. Abandoned carts

Rather than letting those potential customers forget about your client’s products, targeting them with your ads campaign can nudge them in the right direction.

How can agencies benefit from TikTok Pixel?

It is clear that TikTok Pixel is a game-changer for your marketing efforts…but what can you actually get out of it that makes it a worthwhile investment for your agency?

Conversion tracking

This powerful measurement tool is particularly useful for understanding what content drives engagement; the most important being conversions.

This can include website events such visits, app installs, purchases and subscribing. 

Tracking your campaign performance couldn’t be easier!

With accurate conversion tracking, agencies can instantly assess the effectiveness of their campaigns and showcase concrete ROI results to their clients. 

Quantifiable results

Precise data about user interactions can be attributed to specific TikTok ads.

Website traffic, conversions and engagement are all measurable results that can show a direct correlation to an agency’s advertising efforts;making TikTok Pixel a great tool for ROI tracking.

Improved user targeting

Adapting to the rapidly changing digital trends is key for any marketing agency looking to stay ahead of their game.

TikTok Pixel offers real-time data optimization, meaning that you can upgrade your ad campaigns based on precise data on consumer habits of target audiences.

Agencies can benefit from this and create data-driven content that is both relevant and up to date with the current TikTok trends. 

Find out more: How to Get Verified on TikTok

A comparison: TikTok Pixel vs Facebook Pixel

Whether you choose the Tiktok Pixel or Facebook Pixel depends on which platform you’d rather advertise with. Although Facebook is the founding father of TikTok, the recently launched app has seen tremendous success. That’s why we think a fair comparison between the two deserves to be made. 🤔

Trend Sensitivity

  • TikTok is known for its everchanging popular trends and challenges.

 As a result, TikTok Pixel is specifically designed for this environment, making it an adaptable tool for agencies to optimize their campaigns based on the most recent trends.

  • Facebook isn’t totally immune to social media trends; however they tend to spread slower in comparison. 

The implication for Facebook Pixel is that it can’t work as effectively for trend-based marketing. 

Video-Centric Analytics

  • TikTok is ideal for generating metrics on video content- particularly short form videos.

This push to deliver value in a short amount of time has led to the platform mastering the art of going viral, which in turn reaches a lot of people in a short amount of time.

  • Facebook is designed to track various interactions, some of them not relevant to video content. 

While this broad tracking can be useful, businesses that prioritize video content will benefit more from a tool that specializes in video metrics. 


  • TikTok’s average CPM comes to $1.82, making it a cost-effective option for businesses of all levels.
  • Facebook’s average CPM reaches $6.73, making it a considerably more expensive option for beginner ad campaigns. 

The takeaway from this short comparison should not be that TikTok is superior, but rather that certain types of businesses will benefit more from TikTok Pixel.

Thus, for clients in the B2C industry, TikTok Pixel may be a great addition to improve current marketing efforts.

How to set up a TikTok Pixel code in minutes

Now that you know what a TikTok Pixel is, it is imperative that you can set it up successfully in just a few steps.

Step #1

Login to your TikTok Ads Manager and select Tools>Events.

tools events in TikTok

Step #2

Based on your campaign goals, choose between Web Events and App Events.

web events or app events TikTok

For promotions of websites, click Web Events, whereas for promotions of mobile apps select App Events. 

In this guide we will choose Web Events.

Step #3

You will be redirected to a new page. Click on Set Up Web Events to create your website Pixel.

set up TikTok pixel

Step #4

You are now given the option to manually install the TikTok pixel or automatically set it up with a third-party platform.

Create pixel in TikTok

If you are already using a partner platform like Shopify and WooCommerce, click on Partner Setup.

Alternatively, choose Manual Setup for any other platform.

Step #5

After clicking Manual Setup, you will be asked to name your new Pixel. 

Make sure that the Pixel name is relevant to your dedicated advertising campaigns.

 Click Next once complete.

Note: The maximum character length is 128 characters, including spaces.

Name your TikTok pixel

Step #6

Add and categorize defined events into the funnel to gain more knowledge about conversion patterns. 

Add events for TikTok pixel

You can also click on Use Template for a pre-made funnel.

Remember: This step is optional  but highly recommended!

Step #7

Choose to set up Events API with Custom Code or Event Builder.

Select event set up method in TikTok

This will depend on whether you are able to receive developer support, as Events API and Custom Code require more technical knowledge.

For the automatic Event Builder, simply click on Create Events.

Select Copy Pixel Code and paste it in the header section of your website.

Copy paste pixel code from Tiktok

Don’t forget to choose how you want your events to be tracked.

URL Events are a simpler option most agencies tend to opt for.

Track events in TikTok

TIP: Make use of the TikTok Pixel Helper if opting for the Click Events. This is a Chrome extension tool that can help you test for errors in your Pixel code to ensure that installation goes smoothly.

Find out more about the TikTok Pixel Helper here

For the Events API and Custom Code option, simply follow the instructions provided.

Find out more: How to Create a TikTok Advertiser Account

How to install TikTok Pixel

You have now created your powerful Pixel code.

Great, you’re almost there!

The final step is all about installing the tracking tool to your client’s website.


As this platform is a TikTok partner, setting it up should be a breeze!

There are two methods to install TikTok Pixel on Shopify:

Automatic installation 

Select the Partner Setup option when creating a Pixel and simply pick Shopify from the options.

Install TikTok pixel

Once your store is connected, TikTok will automatically integrate the tool to your website. 

Manual installation

Not all Shopify stores are compatible with the automatic setup, thus manually installing the pixel may sometimes be necessary.

To do this, simply click on Tools>Events>Set Up Web Events> Manual Setup

Follow the steps discussed in the previous section to copy the Pixel code.

Afterwards, go to your Shopify admin page and click on:  Online Store> Themes> Actions>Edit Code.

Manual installation of TikTok pixel

Select Layout>theme.liquid 

TiTok pixel code installation

This will show you some vital code for your theme.

Now, search for this precise HTML tag: </head>

  • On Windows: Use Ctrl + F to search
  • On MacOS: Use Command + F to search
Install TikTok pixel

Once you find it, paste your previously copied Pixel code directly above this tag and save.

Do not alter anything else! 

TIP: If you plan on tracking completed orders, add the code to the page your customer sees after an order is completed.

Go to your Shopify admin page and click on Settings> Checkout>Order Processing.

Find a section called Additional Scripts and paste your Pixel code there.


Unlike Shopify, this is not a TikTok partner platform, thus manual installation is the easiest option.

Follow the step-by-step instructions on how to set up a TikTok Pixel manually and copy the code.

WPCode is a popular code snippet plugin for Wordpress that allows for custom codes to be installed on your website. 

Make sure that you download and activate it via the Plugins category on WordPress.

From the dashboard menu, click on Code Snippets>Header & Footer.

Simply paste the TikTok Pixel code into the Header and save your changes.

You’re all done!

How to get access to your clients’ TikTok accounts

Do you need to request TikTok access from your clients in order to utilize the marketing powers of TikTok Pixel?

Agencies know the struggle of access requests all too well!😖

As the CEO of HELPY Media puts it: "90% of the time, it was a big ass email detailing everything we needed access to.” 

Not to worry! 

Automating the onboarding process is the best way to make it a less painful experience.

Signing up with Leadsie means that you get a unique link that can get you access to your client’s TikTok Ads account in just a few minutes. 

Don’t believe us?

Here’s how it works:

“It was natural when we saw a solution like Leadsie. I said we need that, we need that!” -CEO, HELPY Media

Final thoughts

TikTok Pixel is a powerful tracking tool that targets user activity with precision and effect.

As TikTok rapidly evolves, it is necessary to utilize all instruments available to be a leader in digital marketing.

By learning how to utilize the full potential of TikTok advertising, you can refine your ad delivery to surprise your clients with real results.

Why not make an impression during the onboarding process too?

Leadsie is the fastest way to get access to client TikTok ads accounts. 

Try it out with a 14-day FREE trial by entering your email in the box below!🎉

Useful? Share the article below 🙌
Nina Lelidou

Nina is an SEO content writer who has a passion for helping SaaS businesses grow their organic traffic. She has produced web content in various niches, the most prominent being e-commerce, workflow automation, and marketing. When she’s not focused on making content that ranks, she loves to travel across the Mediterranean and come up with creative recipes to try out in the kitchen.