TikTok Pixel Setup for Ecommerce: Events, Events API and Testing
Priya Raghunathan
E-commerce Performance Manager
A working tiktok pixel setup for an online store has four parts: create the pixel in TikTok Events Manager, send the standard events a store needs with real values, add the Events API with a shared event_id so TikTok does not count an order twice, and test everything before the budget goes live. This guide walks through each part from TikTok's own Business Help Center, with the checks that catch most broken setups.
Quick answer: In Ads Manager, go to Tools, Events Manager, Connect Data Source, Web. Pick Partner Integration (Shopify, Google Tag Manager and others) or Manual Setup. Send ViewContent, AddToCart, InitiateCheckout and Purchase with content_ids, value and currency. Add the Events API with the same event name and event_id on both sides. Test with the Test Events tab and the TikTok Pixel Helper, then watch Diagnostics and Event Match Quality.
This is the TikTok version of our Snapchat Pixel setup guide. The ideas are the same; the names, windows and tools are different, and those differences are what this article covers.
What does the TikTok Pixel do for an online store?
The TikTok Pixel is a piece of code on your website that tells TikTok what people do after they see or click an ad: which products they view, what they add to the basket and what they buy. Those events feed three things in TikTok Ads Manager: conversion reporting, optimisation towards a goal such as purchases, and audiences built from site visitors.
For catalogue campaigns the pixel matters even more, because TikTok has to tie each event to a product in your feed. Our guide to TikTok catalog ads covers that match rate in detail.
The pixel runs in the browser, so ad blockers and browser privacy settings can stop some events. That is why TikTok's Events API page recommends adding an Events API integration to an existing pixel and using event deduplication across the two.
Put this guide to work
Launch, test and scale campaigns on six ad platforms from one place, with Wavo, your team of AI agents, at your side. Free for 14 days.
How do you create a TikTok Pixel in Events Manager?
TikTok's pixel setup page gives the path:
- Log in to TikTok Ads Manager and go to Tools.
- Click Events Manager.
- Click Connect Data Source and select Web.
- Enter your website URL.
- Choose Partner Integration or Manual Setup.
- Name the pixel (up to 128 characters, spaces included) and finish the flow.
Name it after the store and the domain, such as "Store name, main domain". Agencies with several clients in one Business Center will thank themselves later; our TikTok Business Center guide for agencies covers how assets are shared.
Partner Integration or Manual Setup?
Pick one route per site and stay with it. Two installs of the same pixel, such as a partner app plus code pasted into the theme, fire every event twice.
| Route | How it works | Best for | Watch out for |
|---|---|---|---|
| Partner Integration | Pick a partner such as Shopify or Google Tag Manager and follow its flow | Stores on a supported platform | Leftover manual code in the theme |
| Manual Setup | Install the base code, then add events with Event Builder or code | Custom stacks with a developer | Event code on every template |
Shopify. The TikTok app for Shopify offers data sharing levels. TikTok's Shopify data sharing page describes three: Standard uses the TikTok Pixel only, which browser ad blockers can stop; Enhanced uses the TikTok Pixel, Events API and Advanced Matching; Maximum adds Shopify APIs and In-App Shopify Checkout, which TikTok marks as beta. If you run the app on Enhanced or Maximum, the Events API is already part of the setup, and you should not build a second one by hand. Our guide to server-side tracking on Shopify compares this with the Meta, Google and Snapchat apps.
Google Tag Manager. Load the base code in a tag on all pages and one tag per event on the right trigger, reading values from your data layer. Use preview mode while you build.
Which standard events and parameters should a store send?
TikTok's standard events page lists the events TikTok recognises, from AddPaymentInfo to ViewContent. For an online store, five cover the funnel:
| Event | When it fires | Parameters worth sending |
|---|---|---|
| ViewContent | Product page view | content_ids, content_type, value, currency |
| AddToCart | Add to basket | content_ids, content_type, quantity, value, currency |
| InitiateCheckout | Checkout begins | value, currency |
| AddPaymentInfo | Payment details entered | value, currency |
| Purchase | Order confirmation | content_ids, quantity, value, currency, plus an event_id |
TikTok recommends Purchase "when placing an order and making a purchase are the same", which is the case for most online stores. One naming detail trips people up: some older TikTok pages, including the catalogue match rate guide, still list CompletePayment as the purchase event for catalogues. That is the old name: TikTok's guide to its updated standard events says CompletePayment was renamed to Purchase from 1 May 2025 for web events. Existing setups keep working and you do not have to rename any code, because TikTok converts the old name automatically and shows Purchase in reporting, audience creation and optimisation. Any new pixel setup should use Purchase. Whichever name you send, keep it the same on the Pixel and the Events API.
Three rules matter more than the table:
- One action, one event. Purchase fires once, on the confirmation page, not again when the shopper refreshes it.
- Real values.
valueandcurrencyon Purchase should match the order total in your store admin, in the store's currency. - Product IDs that match the catalogue. If you run catalogue ads,
content_idsmust use the same format as the SKU IDs in your feed, or matching fails.
How do you add the Events API without double counting?
The Events API sends the same events from your server, so TikTok still receives a purchase when the browser event is blocked or the confirmation page closes too early. The cost is that TikTok may now receive each order twice, and it needs a way to know they are one.
TikTok's event deduplication page sets the rule: you must share the same event_id through both the Pixel and the Events API, with the same event name. When events overlap, TikTok records the first event it receives for measurement and reporting, and the page describes a 48-hour window from the first event for treating later ones as duplicates.
In practice:
- Use the order number as
event_idfor Purchase. It already exists in both the browser and your back end, and it is unique per order. - Make the two values identical, character for character. "20731" on one side and "#20731" on the other are two different IDs.
- Use the same event name on both sides. A browser Purchase and a server CompletePayment will not deduplicate.
- Never reuse an ID across orders, or genuinely separate purchases can collapse into one.
A worked example. A shopper places order 20731 for $58. The browser fires Purchase with event_id 20731, value 58 and currency USD. A few seconds later your server sends Purchase with event_id 20731 to the same pixel through the Events API. TikTok keeps one purchase of $58. If an ad blocker stopped the browser event, the server event still records it. If the server sent event_id "order-20731" instead, TikTok would treat them as two purchases and could report $116.

Which match keys should the Events API send?
TikTok's matching events guide lists the keys that help it tie an event to a person:
- Click ID, the identifier TikTok appends to the landing page URL when someone clicks an ad. Capture it on landing and store it with the session so the server can send it.
- The
ttpfirst-party cookie, set on your own domain. - Email and phone, hashing required.
- External ID, such as your customer ID, hashing required.
- IP address and user agent of the visitor. TikTok notes these are shared by default for the Pixel and need manual configuration for the Events API.
On the browser side, TikTok's Advanced Matching for Web page describes two modes. Automatic picks up form fields such as email and phone on pages where the pixel runs; Manual lets you choose which parameters to send, in code for each event. Emails and phone numbers are hashed with SHA256 before they reach TikTok's servers. TikTok recommends using both modes together, and suggests Manual only for regulated or sensitive sectors such as financial services or healthcare.
How do you test the TikTok Pixel?
Test before any budget goes live, and again after each theme change, checkout change or app install.
- Test Events. TikTok's testing walkthrough has you open the pixel in Events Manager, click the Test Events tab and enter your website URL to create a QR code. Scan it in the TikTok app, open your site, perform the actions on your phone and watch Event Activity appear. Expand an event to see its parameters. TikTok says this test environment mimics how your website shows up in the TikTok app, which a desktop browser does not.
- TikTok Pixel Helper. A Chrome extension that verifies and troubleshoots pixel installation on desktop, with diagnostics at pixel, event and parameter level and suggested fixes.
- A real order. Place one, then compare the Purchase value, currency and
event_idwith the order in your store admin, and check that the server event arrived too.
If an event does not fire, TikTok's advice is to re-check the event's tracking rules or parameters, then test again.
How do you read Diagnostics and Event Match Quality?
Once events flow, Events Manager has two places to watch, described on TikTok's monitoring and diagnostics page:
- Overview tab. Each event shows whether it is Active, meaning it was shared with TikTok in the last 7 days, or has no recent activity. A diagnostics icon marks events with issues.
- Diagnostics tab. Lists quality issues with your data connection and how to fix them. TikTok's Web Diagnostics page gives missing parameter data or content ID, and a first-party cookie that is not enabled for a pixel, as examples.
- Event Match Quality. A score TikTok calculates as a weighted average of your match key coverages, so it rises as more events carry more keys.
Event data is not shown live, and TikTok warns there may be some delay between an event firing and appearing in the dashboard. Do not panic over a gap of a few minutes after a test.
A low Event Match Quality score usually means the server is sending too few match keys. Add the click ID, the ttp cookie, hashed email and phone, IP address and user agent where you have consent to collect them, then watch the score over the following days.
Which attribution windows does TikTok use?
Attribution windows decide how long after a click or a view TikTok credits a conversion to an ad. TikTok's ad group attribution page lists click-through windows of 1, 7, 14 or 28 days and view-through windows of Off, 1 day or 7 days. One rule catches people out: attribution settings cannot be changed once the ad group is published. Decide the window before launch and use the same one when you compare weeks.
TikTok's numbers will not match your store or Google Analytics, because each counts a different thing. Our guide on ad platforms double counting conversions shows how to reconcile platform totals with orders, and UTM parameters for TikTok ads covers tagging clicks so your analytics tool credits them properly.
What are the common TikTok Pixel mistakes?
- Two installs at once, such as the Shopify app plus manual code in the theme, so every event fires twice.
- No
event_id, or different ones, on the Pixel and the Events API, so the same order counts twice. - Purchase in the browser, CompletePayment on the server (or the reverse), so the two never match.
content_idsin a different format from the catalogue SKUs, so catalogue ads cannot match products.- Unhashed email or phone, where TikTok requires SHA256.
- Testing only on desktop, when Test Events can show you how the site behaves inside the TikTok app.
- Optimising for purchases before the event is reliable. Check that Purchase is Active and matches your orders for a few days first; our TikTok campaign structure guide covers how to set up campaigns once it is.
Where Wevion fits
Wevion does not install the TikTok Pixel, send Events API events or deduplicate them. That stays with the pixel, your server or the TikTok app for Shopify.
Wevion connects TikTok, Meta, Google, Snapchat, Taboola and Outbrain ad accounts through each platform's official API, syncs data about every 15 minutes and shows platform-reported spend and conversions for every account side by side. If TikTok purchases fall while orders hold steady, you see it next to the other platforms, and automated rules can pause ad groups, change budgets or just notify you, with a cooldown and a daily cap on runs.
The Wevion app for Shopify syncs orders, products, refunds and product costs; it does not send events to TikTok. With those costs in place, Profitability Analytics, in beta, shows profit and POAS next to ad spend, a store-side check on what the pixel reports.
You can try it on your own ad accounts with 14 days free on any plan, no card.
Key takeaways
- Create the pixel in Events Manager under Connect Data Source, Web, and install it one way only: Partner Integration or Manual Setup.
- Send ViewContent, AddToCart, InitiateCheckout and Purchase with real
value,currencyandcontent_idsthat match your catalogue. - Add the Events API with the same event name and
event_idon both sides; the order number works well for Purchase. - Send the click ID,
ttpcookie, hashed email and phone, IP and user agent to raise Event Match Quality. - Test in the TikTok app with Test Events, on desktop with Pixel Helper, and with one real order.
- Choose the attribution window before you publish an ad group, because it cannot be changed afterwards.
Explore more in
Ads Management Platform
Read the curated pillar page with every guide in this topic, ordered from foundations to advanced.