How to create and install the Ad TikTok Pixel

Create and install a TikTok pixel

The TikTok Pixel is a powerful measurement tool that tracks your TikTok ads’ impact on your website. This clever bit of code enables you to monitor sales, user activity, and find the right audience for your ads.

TikTok’s pixel is a javascript code that allows you to track and understand the actions users take on your website. When a user gets to your site, the pixel fires, tracking their behaviour and conversions. 

Common uses of a pixel include:

  • Measuring campaign performance: Measure your ad performance and conversions based on a series of events you define.
  • Optimising ad delivery: Setting an event as your optimisation goal allows the system to target users who are most likely to do that action on your site, like adding to cart, registering, completing payment, etc.
  • Building audiences based on behaviour: Track users on your site and then create Custom Audiences or Lookalike Audiences based on how they engaged and where they dropped off in your funnel. These audiences can then be used for remarketing.

Learn How To Set Up TikTok Pixel?

To set up the TikTok Pixel and get the most out of it, you will need to follow six main steps:

Step 1 : Create pixel

Name your pixel and get the pixel code.We recommend the pixel name corresponds to the website or domain name. Maximum character length is 128 characters, including spaces.

Creating Your TikTok Pixel

Step 2 : Install pixel

You can add the pixel code onto your website manually or through Google Tag Manager.

a. Install Manually

Choose “Manually Install Pixel code” and click “Next“

Paste the pixel code at the top of the header section on your website.

Your header starts with the <head> tag and closes with the </head> tag. Paste it at the top (right under the <head> tag). Here’s an image for your reference:

Some themes have a central location for the “Header and Footer Scripts” section, you can paste the pixel into the header section here. Please check your theme settings for detailed specifications or ask your website developer for help.

Only paste your pixel code once. Do not add the pixel repeatedly to the header section.

b. Install using Google Tag Manager

Choose “Install Pixel code by 3rd party tool” and click “Next

Click “Connect to a Google account” to connect your Google Tag Manager account.

Select your Google Tag Manager account, container, and workspace. Then click “Next”.

If you want to switch to a different Google account, click “Use another Google account”.

Step 3 : Download TikTok Pixel Helper

You can use TikTok Pixel Helper to check whether the pixel code is added correctly and whether the events are triggered successfully.

Step 4 : Select an Event Tracking Template

Choose an industry category that matches your business scenario (E-commerce, Form Submission, Consultation, Apk Download or Custom event) to create a series of events accordingly.

The four industry templates include 3-5 pre-defined event types for each scenario along the user path. Name each event and set the event Value for your business, including setting the Currency and the Statistical Method. 

  1. Event Name and Value are optional.
  2. For Statistical Method, you can choose “Every Time” or “Once” (default setting).


In situations where you want to know if one user completes the event multiple times, choose “Every Time” as your Statistical Method, so that the conversions will be counted as 2. In situations where you want only one event to be recorded per user, choose “Once” as Statistical Method so the conversion will be counted as 1.

If the four industry templates do not meet your needs, you can always choose a custom event template to define your own events. Custom templates can support up to 5 events; select from 17 available standard events.

Step 5 : Define events

Define a series of events to track user actions. You can define tracking rules  for each event by choosing either Element Click, Destination URL, or Pop-up Events. This helps our auction system determine if a user took the action you desired on your website.

Note: pixel will not track event activity if events are not defined 

There are two methods for defining Click Events:

  1. Entering your website url and selecting the element on the preview page.
  2. Manually adding CSS selector of the element.


Select element on the preview page:

  1. Enter your landing page URL (including http / https) in the Website URL text box at the top of the page, and click “Update“. Your page will load on the left side.
  2. Click on the desired element (button) on your webpage.
  3. A pop-up will appear to confirm. Click “Save“.
  4. Your selection will automatically appear as a rule.

Note: For Click Events, the default setting for the preview page is Element selection mode, but you can also switch to Webpage preview mode.

Manually add CSS selector code:

  1. Click “Add Rule“.
  2. Enter your CSS selector code.
  3. Contact your website developer to provide the CSS selector code for your selected element and enter it in the blank. If entered incorrectly, the system will display an error message. Click “Save“.

Step 6 : Create ads and view data

At the ad group level, link the pixel and choose an event as the optimisation goal. 

After your campaign goes live, you can view all event data within Event Manager and across your campaign dashboards.

Interested In Using TikTok Pixel In Your Marketing Strategy?

If you would like to know more about TikTok Ads head on over to our dedicated page, and if your still uncertain about making the jump to a new platform at the very least get the “TikTok Pixel” (it’s FREE) installed so it can start learning about your website visitors.

Fill in the form below with your details if you wish to contact us for further assistance.

    Author: Graham Paffett

    A seasoned luxury goods & services digital marketer with over 20 years Exp. A specialist in developing "disruptive" digital campaigns and strategies for FMCG brands both within the UK and International. • Paid Social (inc. Facebook/Instagram, TikTok, LinkedIn & Pinterest) • SEO (Search Engine Optimisation) • PPC (Pay Per Click) • CRO (Conversion Rate Optimisation) • ASO (App Store Optimisation) • Direct To Consumer & B2B Digital Strategy Specialist • Social Media Marketer