Track TikTok ad sales with the TikTok Pixel
Connect the TikTok Pixel and the Events API so TikTok Ads Manager sees which ads bring shoppers to your store and which of them buy, with the value and products of every cart and order.
The TikTok Pixel add-on tells TikTok what shoppers do on your store after they see or click one of your TikTok ads: which pages and products they look at, what they add to the cart, and which orders they place. TikTok Ads Manager uses that to show which ads bring in sales and to find more shoppers like your buyers.
It is not the same as selling on TikTok Shop. TikTok Shop lists your products inside TikTok. The pixel measures ads that send shoppers to your own store. You can use either one, or both.
Before you start
- A TikTok Ads Manager account for your business.
- A TikTok Pixel in Ads Manager. To create one, go to Tools → Events → Web events and set up a web event with the TikTok Pixel. When TikTok asks how to install it, choose to install it manually. You won't paste any code: YNS installs the pixel for you.
Get your Pixel ID and access token
- In TikTok Ads Manager, open Tools → Events → Web events.
- Choose your pixel.
- Copy the Pixel ID shown under its name. It is a string of capital letters and numbers, like
CXXXXXXXXXXXXXXXXXXX. - Open the pixel's Settings, find Events API and click Generate access token. Copy the token. It is optional, but without it you miss some sales. See Count sales the pixel misses.
Connect the add-on
- In YNS, open Add-ons and choose TikTok Pixel.
- Paste the ID into Pixel ID.
- Paste the token into Events API access token, if you generated one.
- Click Save.
The pixel starts loading on your storefront and your checkout straight away.
What TikTok receives
The pixel reports these events:
| What the shopper does | TikTok event | Value, currency and products |
|---|---|---|
| Opens any page of your store or checkout | Page view | – |
| Opens a product page | ViewContent | The product and its price |
| Adds a product to the cart | AddToCart | The product, quantity and price |
| Reaches checkout | InitiateCheckout | Every product in the cart and the cart total |
| Places an order | Purchase | Every product ordered and the order total, with shipping and discounts |
Each product is reported with its SKU, or with its variant ID if it has no SKU. Prices include tax, in your store's currency.
When a shopper places an order, the pixel also passes TikTok their email address, so TikTok can recognise the shopper who saw your ad. It is scrambled (hashed) in the shopper's browser before it leaves, so TikTok never receives it in readable form.
Count sales the pixel misses
The pixel runs in the shopper's browser. An ad blocker can stop it, and a shopper who closes the tab right after paying may leave before it reports the order. Each lost order makes your ads look worse than they are.
With the access token saved, YNS also sends product views, add to cart, checkout started and completed orders to TikTok from our servers, through TikTok's Events API. That copy arrives whatever happens in the browser. It carries the shopper's TikTok browser ID, the ID of the ad they clicked, and for orders their hashed email and phone number, so TikTok can match it to the right ad.
Each event carries the same ID from the browser and from the server, so TikTok counts it once.
Check that it works
- Install the TikTok Pixel Helper extension in Chrome.
- Open your store, view a product and add it to the cart.
- The Pixel Helper lists the events as they fire, with their value and currency.
In Ads Manager, Tools → Events → Web events shows the events within a few minutes.
To check the server copies before you advertise, copy the test event code from the pixel's Test events tab into Test event code in the add-on and save. The server events then show up on that tab. Clear the code and save again when you are done: while it is set, the server copies stay out of your reports. Some TikTok tools still show Purchase under its older name, Complete payment. It is the same event.
Cookie consent
If your store shows the cookie consent banner, the pixel loads only after the shopper accepts. A shopper who declines is not reported to TikTok at all, neither from their browser nor from our servers. The same applies to a shopper whose browser sends a Do Not Track or Global Privacy Control signal.
If you sell in the EU, turn the banner on and mention TikTok in your privacy policy. See Meet EU compliance requirements.
Remove the add-on
- Open Add-ons → TikTok Pixel.
- Clear Pixel ID and click Save.
The pixel stops loading, YNS stops sending events to TikTok, and the add-on is removed from your store.
FAQ
Do I need the Events API access token?
The pixel works without it. Add the token if you want carts and orders counted when an ad blocker stops the pixel or a shopper closes the tab after paying.
Will an order be counted twice if both the pixel and the server report it?
No. Both copies carry the same ID, and TikTok keeps one.
I already added the TikTok Pixel through Google Tag Manager. Should I use the add-on too?
Use one or the other. Running both reports every event twice. The add-on sends the value, currency and products with each event for you, so you can remove the TikTok tags from your container.
Can I run the TikTok Pixel and the Meta Pixel at the same time?
Yes. Each add-on reports to its own platform. See Add tracking and pixels for the Meta Pixel.
Does the add-on report orders from before I connected it?
No. Reporting starts with the first visit after you save the Pixel ID.
What's next
- Measure your other channels with Add tracking and pixels.
- Sell inside TikTok with Sell on TikTok Shop.
- Get consent right in Meet EU compliance requirements.