Getting the Facebook & TikTok pixel scripts
HOW TO CONFIGURE FACEBOOK ADS & TIKTOK ADS PIXEL SCRIPTS
I. Configuring Facebook Ads
The Facebook Pixel (now called a Dataset) is a snippet of code placed on your website that measures ad performance, optimises campaigns and builds custom audiences.
1. Creating a Dataset and getting your Facebook Pixel code
Getting started (creating the Pixel):
-
Every personal ad account and every Facebook Business Manager (BM) account gets a Pixel ID for tracking events on your website.
-
Important: during setup, do not tick the option shown in the image below — it leads to an incorrect configuration.
To finish the setup and collect the values you need, work through the following 8 steps in order:
Step 1: Open Facebook Ads Manager at the official address: https://www.facebook.com/adsmanager.
Step 2: From the ads home screen, click the Settings icon under Business portfolios to open your business settings.
Step 3: In the left-hand navigation, choose Datasets (formerly Pixels) -> click Add -> enter a name for your new Dataset -> click Create to finish.
Step 4: Click the three-line menu (All tools) in the top left -> choose Events Manager -> find and select the Dataset you created in Step 3 -> choose Gather website events from browser activity -> click Set up Meta Pixel.
Step 5: Choose Manually add Pixel code to website -> click Install code manually.
Step 6: Click Copy Code to copy the Pixel's base script -> click Continue. The snippet you just copied is the script that goes into your website's header.
Step 7: Turn on Automatic Advanced Matching so the Pixel collects more accurate data -> click Continue -> then click Cancel to close the quick-setup window.
Step 8: Go back to the Dataset settings, open the Settings tab of the Dataset you created -> find Generate an access token under Conversions API -> click it and double-click to copy the token that is generated.
2. The values you need to save
Once you have finished the process above, collect and keep these three core values so you can configure your website admin:
-
Pixel ID: the ID shown directly under your Dataset name (from Step 4).
-
Header script: the base JavaScript snippet that goes into your website's header tag (copied in Step 6).
-
Access token: the secure token used by the Conversions API to send data straight from the server (copied in Step 8).
3. Step-by-step video guide
If you get stuck, watch the screen recording below for a visual walkthrough of every step:
Watch the detailed Facebook Ads setup video
4. Adding the codes to your website
Once you have all the values you need, open your website admin to configure them:
Header scripts:
Paste the header script you copied in Step 6 into the Header Scripts field in your website system, as shown below:
Pixel ID and access token:
Paste the Pixel ID and the access token into the matching connection fields in the admin system:
II. Configuring the TikTok Ads Pixel script
The TikTok Pixel is an analytics tool that measures how well your TikTok ad campaigns perform by tracking what users do on your website.
1. Setting up and getting your TikTok Pixel code
Step 1: Open TikTok Ads Manager
-
Sign in to TikTok Ads Manager.
-
From the main menu, choose Assets -> Events.
-
Under Web Events, click Manage to start the setup.
Step 2: Create a TikTok Pixel
-
Click Create Pixel.
-
Give the Pixel a memorable name so it is easy to manage -> choose the TikTok Pixel type -> click Next.
-
Choose the installation method that suits you:
-
Manually Install Pixel Code: choose this if you want the script to paste into your website source yourself.
-
Use a Partner Integration: choose this to integrate automatically through a third party such as Shopify, WooCommerce or Google Tag Manager.
-
Step 3: Get the Pixel script
-
Once it is created, TikTok gives you an HTML/JavaScript snippet.
-
Copy the whole snippet and paste it between the
<head>and</head>tags of your website, or send it to a developer to add it to the source.
2. Checking that the TikTok Pixel is working
Step 4: Verify the installation
-
Install the TikTok Pixel Helper extension from the Chrome Web Store in your browser.
-
Visit your website and open the extension to check that the Pixel is detected as active and that events are being recorded correctly.

