Customer Impact

Data & Tracking

TikTok Pixel: installation, event tracking and connecting the Events API

Copy for AI

The TikTok Pixel is JavaScript that tracks what TikTok ad visitors do on your site.

Think of a submitted form, a product in the basket or a completed purchase.

TikTok uses those events to attribute conversions, optimise campaigns and build audiences.

The verdict: install the TikTok Pixel through Google Tag Manager, set up real standard events, and add the TikTok Events API for what the browser misses.

For many Belgian and Dutch companies, TikTok is a newer channel.

That’s exactly why measurement often lags behind.

The base code is there, but the events that matter are missing.

This guide covers installation, events, the Events API and testing, step by step.

What does the TikTok Pixel do?

It does three jobs, and only one of them works with page views alone.

Here’s what the pixel is for:

  • Measure conversions: every action you set up is tied to the ad the visitor came from.
  • Optimise: TikTok steers budget towards people likely to take the same action.
  • Build audiences: reach visitors again and let TikTok build lookalikes of your converters.

Without conversion events, TikTok optimises on clicks or views. That’s cheap traffic, not leads.

You can reach website visitors again with retargeting. And TikTok can model a lookalike audience on your best converters.

Which standard events should you use?

TikTok works with a fixed list of standard events. They’re actions with predefined names for reporting, optimisation and audiences.

These are the most useful ones for B2B and lead generation:

EventWhen to use it
SubmitFormA contact or quote form was submitted
ContactSomeone clicks to call, email or chat
ScheduleAn appointment or demo was booked
CompleteRegistrationA registration for a webinar or account was completed
DownloadA white paper or brochure was downloaded
ViewContentAn important page was viewed
AddToCart, InitiateCheckout, PurchaseWeb shops: basket, checkout, purchase

Rule of thumb: pick one primary event per goal. For a B2B site that’s usually SubmitForm or Schedule.

How do you install the TikTok Pixel?

In five steps, from Events Manager to a tested tag.

TikTok describes the installation in its guide to getting started with the pixel. Here’s the order we follow.

Step 1: Create the pixel

In TikTok Ads Manager, go to Tools and then Events Manager. Choose Connect Data Source, then Web.

Give the pixel a name that matches your domain.

Step 2: Choose your installation method

TikTok offers two routes:

  • Partner integration: for example Shopify or Google Tag Manager
  • Manual installation: you paste the base code yourself

We almost always use Google Tag Manager. You keep every ad tag in one place, tied to the same cookie consent.

And you can test every change in preview before it goes live.

Step 3: Install the base code

In Google Tag Manager, use the TikTok template from the Community Template Gallery. Enter your pixel ID.

Let the base tag fire on all pages, but only after consent for marketing cookies.

Step 4: Set up your events

Create one tag in GTM per conversion.

Each tag sends the right standard event, triggered by an event in your data layer.

How to build those events is in our explanation of event tracking.

Step 5: Test before you launch

Test with the tools further down before you select the pixel in a campaign.

Here’s the whole flow in one picture:

TIKTOK PIXEL SETUP Five steps, in this order 1 Create Events Manager 2 Method GTM or partner 3 Base code after consent 4 Events from data layer 5 Test then launch Skip step 4 and TikTok only sees page views, so it can’t optimise on leads.

Why do you see PageView but no conversions?

Because the conversion event never reaches the tag. The cause is almost always in the data layer.

This is the question we get most often. The base code fires and TikTok Pixel Helper shows PageView.

But the basket, the form or the purchase stays empty.

The trigger listens for an event that doesn’t exist

Tutorials often use a trigger name like purchase, or an event from a specific plugin. If that event doesn’t exist on your site, the tag never fires.

Some shop platforms push e-commerce events to the data layer automatically.

A custom site, or a WordPress site with a form plugin, doesn’t do that by itself. There, a developer or your tracking partner pushes an event when the form was really submitted.

Two fixes that solve most cases

Measure the confirmation, not the click. A click on “Send” isn’t a submitted form yet. Let the event fire after a successful submission.

How that works without a thank-you page is in form conversions without a thank-you page.

Pass the same event name to every platform. One form event in the data layer can feed GA4, Google Ads, Meta, LinkedIn and TikTok at once.

Then you compare channels on the same event, and your lead source tracking in the CRM stays consistent.

What is the TikTok Events API?

The TikTok Events API is the server side of TikTok measurement.

Where the pixel runs in the browser, the Events API sends events from your server, your server-side Google Tag Manager container or your CRM.

What the Events API catches that the pixel misses

It fills two gaps:

  • Blocked events: ad blockers and browser restrictions stop some pixel hits
  • Offline actions: for example a lead your sales team qualifies in the CRM

That second point matters most in B2B. A form fill is a guess; a qualified lead is the real signal.

Three ways to connect it

You can connect the Events API in three ways:

  1. Through a partner, for example your shop platform
  2. Through server-side Google Tag Manager
  3. Directly from your own backend

Best for multi-channel advertisers: server-side GTM. If you also run Meta, Google Ads and LinkedIn, one server-side layer feeds every platform.

How it works is in our guide to server-side tracking.

How do you deduplicate the pixel and the Events API?

Send one shared event_id through both channels, so TikTok knows it’s one conversion.

TikTok’s deduplication guide sets three rules:

  • share the same event_id, pixel ID and event name through pixel and Events API
  • identical events arriving 5 minutes to 48 hours after the first are merged
  • TikTok keeps the first event received for measurement and reporting

Here’s what that looks like for one form submission:

DEDUPLICATION Two channels, one conversion Form submitted event_id: abc123 Pixel (browser) SubmitForm + abc123 Events API (server) SubmitForm + abc123 TikTok merges 1 conversion counted Example ID. Without the shared event_id, TikTok counts the same lead twice.

When you don’t need deduplication

If each channel sends different events, without overlap, deduplication isn’t needed.

For example, say the pixel sends ViewContent and the Events API only sends qualified leads from your CRM. Nothing overlaps.

When it’s mandatory

As soon as the same form leaves through browser and server, a shared event_id is mandatory.

Create the ID in the browser at the moment of submission.

Then pass it through the data layer to both tags.

Which mistakes do we see most often?

Five problems explain most broken TikTok setups.

Pixel not selectable in your campaign

A new pixel first has to receive events.

Send a test event through Test Events and give TikTok time to activate it.

Base code not found

Events Manager says the base code is missing, while Pixel Helper does see it.

Often a cookie banner blocks the pixel during the check. Or the installation is on a different domain from the one set in the pixel.

Fix: accept your cookies and check the domain.

Double installation

A plugin and GTM each send the same events.

Pick one and remove the other.

Every click as a conversion

Some setups measure every button as Contact, including “read more”. TikTok then optimises on noise.

It’s the same trap we describe in cleaning up false conversions.

”The pixel makes my site slow”

A pixel that loads asynchronously rarely slows your site noticeably. Heavy custom scripts in Tag Manager do.

Measure it with our website speed test before you remove the pixel and rely on the Events API alone.

How do you test whether the TikTok Pixel works?

With three TikTok tools, plus the Google Tag Manager preview.

TikTok provides these:

  1. TikTok Pixel Helper: a Chrome extension that shows which pixel and events fire per page.
  2. Test Events in Events Manager: your test session’s events arrive live, including Events API hits.
  3. The Diagnostics tab: Events Manager flags missing parameters or duplicate events.

Look for the event name and the event_id on the confirmation page:

A test routine in four checks

Combine the TikTok tools with the GTM preview:

  • accept cookies, submit a test form, check the tag fires with event and event_id
  • refuse cookies and check the pixel no longer fires
  • open Test Events and confirm one event per submission
  • after go-live, compare TikTok leads with your CRM every week

Google’s own Tag Assistant helps for the GTM side of that check.

We do a full check of all your platforms in a tracking audit.

Want to start yourself first? Use our conversion tracking audit checklist.

No. The pixel and the server-side events both need consent for marketing cookies.

The Belgian Data Protection Authority states that no cookie or tracker may be placed or read without prior information and consent, unless it’s strictly necessary.

In the Netherlands, the Dutch Data Protection Authority (Autoriteit Persoonsgegevens) follows the same line.

What that means for your setup

Make the pixel and the Events API depend on consent for marketing cookies. That includes the server-side events, not just the browser tag.

How to get your banner and signals right is in cookie banner rules in Belgium. Our cookie scanner shows which trackers your site sets before consent.

How does this fit into your TikTok approach?

A correctly measurable pixel is the basis for steering TikTok on leads or sales.

When TikTok makes sense for B2B is covered in TikTok Ads for B2B. For the campaigns themselves, there’s our TikTok Ads team.

One measurement layer for every platform

If you advertise on several platforms, the same data layer feeds them all. Read our guides on:

Want TikTok, Meta, LinkedIn and Google Ads measurement in one server-side setup? Our tracking specialist builds it to measure, on request.

What such a setup looks like is shown in the Kaizo tracking case.

Frequently asked questions

Where do I find my TikTok Pixel ID?

In TikTok Ads Manager under Tools and then Events Manager. Every pixel is listed there with its ID, the installation instructions and the diagnostics.

How do I install the TikTok Pixel through Google Tag Manager?

Use the TikTok template from the Community Template Gallery, enter your pixel ID, let the base tag fire on all pages after consent and add a tag per conversion with the right standard event.

What is the difference between the TikTok Pixel and the Events API?

The pixel measures in the browser, the Events API sends events from your server or CRM. If you use both for the same event, you deduplicate with a shared event_id.

Why can I not choose my pixel when creating a campaign?

Usually the pixel has not received any events yet. Send a test event through Test Events and wait until TikTok marks the pixel as ready for campaigns.

How do I check whether the TikTok Pixel works?

With the TikTok Pixel Helper Chrome extension, the Test Events feature in Events Manager and the Diagnostics tab. Also check in the GTM preview that the right event fires with the right event_id.

Is your TikTok Pixel ready for conversion campaigns?

Only if it sends a real conversion event, once, after consent.

If PageView is all you see, fix the data layer first.

Then add the Events API with a shared event_id.

Not sure where your setup leaks? Get in touch and we’ll check your pixel, events and consent in one first review.

Free website scan

Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.

Where should we send your report?

We only use your details for your scan. No spam, unsubscribe anytime.