TikTok Pixel and Events API: Step-by-Step Installation

Without a properly functioning TikTok pixel, ads on this platform operate in the dark. The algorithm doesn't know who purchased, cannot optimize campaigns for sales, and you can't see which creatives are actually generating revenue. In this guide, we show you how to install the TikTok pixel on Shopify, WooCommerce, or via Google Tag Manager, which events to configure, and why in 2026 the pixel alone is not enough without the Events API.

What is the TikTok pixel

The TikTok pixel is a piece of JavaScript code placed on your website. It tracks the actions of users who arrived on your site from an ad: viewing a product, adding it to the cart, initiating checkout, and making a purchase. This data is sent back to TikTok Ads Manager and serves three purposes: measuring results, optimizing campaigns for specific events, and building audience segments for remarketing.

The pixel runs in the browser, so it shares the same limitations as other tags: ad blockers, Safari restrictions, and lack of cookie consent. That's why TikTok recommends combining it with the Events API—sending events directly from your store's server.

Step 1. Create a pixel in Events Manager

In TikTok Ads Manager, go to the Tools section, then to Events Manager. Select Web as the data source and give it a clear name, ideally including your store's domain. Next, choose an installation method. You have three primary options:

• Partner integration—a ready-made connection with Shopify, WooCommerce, and other platforms.

• Manual code installation in the head section of every page.

• Google Tag Manager using the TikTok tag template.

Choose just one method. Installing the pixel simultaneously via an app and manually is the most common cause of duplicate purchase tracking.

Step 2. Installation on Shopify

On Shopify, the easiest approach is to install the official TikTok app and connect it to your TikTok for Business account. The app creates a new pixel or links an existing one, and standard events are sent to your site via Shopify Customer Events, without editing the theme code.

In the app settings, pay attention to the data sharing level. The maximum level enables server-side event transmission for certain events. However, do not assume everything works automatically. After installation, check Events Manager to confirm that purchases are coming from both the browser and the server. If you only see a browser source, you will need a server-side tracking app or a custom integration.

Step 3. Installation on WooCommerce

In WooCommerce, use the official TikTok for WooCommerce plugin. After installation, connect your ad account, select your pixel, and enable product catalog synchronization, which will be useful later for catalog sales campaigns and TikTok Shop. If your store uses other tracking plugins, make sure none of them inject a duplicate TikTok code.

Step 4. Installation via Google Tag Manager

GTM is a great option for stores on custom platforms and for teams that prefer managing all tags in one place. Add the TikTok tag template from the gallery, paste your pixel ID, and create separate tags for each event. Pull the order value, currency, and product IDs from the dataLayer. Without these, TikTok won't be able to calculate return on ad spend or match products from your catalog.

Step 5. Configure standard events

For an e-commerce store, the minimum setup includes five events:

• ViewContent when a product page is viewed,

• AddToCart when an item is added to the cart,

• InitiateCheckout when checkout begins,

• AddPaymentInfo when payment details are entered,

• CompletePayment or Purchase when an order is placed.

Each purchase event should send the value, currency, and content_id parameters. Without the order value, you cannot optimize campaigns for value or see an accurate ROAS. Use standard event names instead of custom ones, as only standard events can be used as optimization goals.

Step 6. Enable Advanced Matching

Advanced Matching sends hashed customer contact details—such as email addresses or phone numbers provided during checkout—to TikTok. This allows conversions to be attributed to users even when cookies fail. In the pixel settings, it's also worth enabling first-party cookies, which help link ad clicks to subsequent purchases.

Step 7. Add Events API and deduplication

The Events API sends events directly from your store's server to TikTok. These events aren't blocked by the browser, allowing you to recover conversions the pixel missed. TikTok recommends a hybrid model where the pixel and Events API run in parallel.

There is one crucial requirement: deduplication. The same event sent from both the browser and the server must share the exact same event_id. If the IDs don't match, TikTok will count the purchase twice, causing your reports to overstate performance. In Events Manager, this issue will appear as a potential duplicates warning.

Step 8. Test before spending your budget

Before launching your campaigns, complete a full audit:

• install the TikTok Pixel Helper Chrome extension and go through the entire funnel from product page to checkout,

• use the Test Events tool in Events Manager to confirm every event is received with its proper parameters,

• place a test order and compare the value reported in TikTok with your store's admin panel,

• after a few days, check the diagnostics and any warnings in Events Manager.

Repeat this verification after any change to your theme, plugins, or checkout process. Updates are the most common cause of broken tracking.

The pixel and GDPR consent

In Poland and throughout the EU, the TikTok pixel requires user consent for marketing cookies. If you use a consent banner, ensure it blocks the pixel until consent is given, and that Events API events for the same user adhere to the same rules. Consistency between both layers prevents legal issues and data discrepancies.

How to interpret pixel data

TikTok attributes conversions within its own attribution window, which includes clicks and views. As a result, numbers in Ads Manager typically differ from GA4. This is completely normal. Use consistent UTM parameters to compare channels in GA4, and use pixel data as an optimization signal within TikTok.

Summary

A properly configured TikTok pixel is an absolute must—without it, your sales campaigns have nothing to learn from. Install it using a single method, set up five standard events with order values, enable Advanced Matching, implement the Events API with deduplication, and test the entire path before launch. If you're just getting started with the platform, be sure to also check out our guide to TikTok Ads.

We implement tracking and run sales campaigns on TikTok for e-commerce stores. Explore our TikTok Ads offering or contact us.

Find your next growth opportunity.

92% of clients stay with us long term

Talk to the team who will work on your business.

Find your next growth opportunity.

92% of clients stay with us long term

Talk to the team who will work on your business.