Short answer
To add the TikTok Pixel to WooCommerce, copy your web pixel code from TikTok Ads Manager → Tools → Events, add it to one tracking plugin, and for server purchases also add an Events API access token from the pixel's settings. Connect your cookie banner, then check purchases in the pixel's Test Events tab before running ads.
What you are setting up
| TikTok Pixel | TikTok Events API | |
|---|---|---|
| Where it runs | The visitor's browser | Your server |
| Sends | Page views, product views, add to cart, checkout, purchase | Purchases |
| Weak when | Ad blockers, browser limits, closed tabs | The access token is wrong or the server cannot reach TikTok |
| Needs consent where the law requires it | Yes | Yes |
Use both with the same event ID, so TikTok counts each purchase once.
What you need
- A WooCommerce shop on a recent WordPress version
- A TikTok Ads Manager account with a web pixel
- An access token for the Events API (optional, recommended)
- A cookie banner, if you have visitors in places that require consent
- One tool that sends TikTok events. Two tools usually mean double counting
Step 1: find your Pixel ID
- In TikTok Ads Manager, open Tools → Events.
- Choose your web pixel (or create one for your website).
- Copy the pixel code: a string of letters and digits.
TikTok changes menu names from time to time. If a name differs, search TikTok's help for "web pixel".
Step 2: create an access token (for server purchases)
- Open the pixel's Settings.
- Find the Events API section and Generate access token.
- Treat it like a password: don't email it or paste it into a page builder.
Step 3: add both to your shop
With TagBuni, a free plugin on WordPress.org:
- In WordPress, go to Plugins → Add New Plugin, search for "TagBuni", then Install Now and Activate.
- Open TagBuni → Platforms, choose how consent works, and open the TikTok card.
- Tick Turn on, paste the Pixel ID, and paste the access token if you want server purchases.
- Click Save.
TagBuni sends ViewContent, AddToCart, InitiateCheckout and Purchase with product IDs, prices, quantities and currency taken from the WooCommerce order.
Step 4: test before you spend
- In the pixel's Test Events tab, copy the test event code.
- Paste it into the plugin and place a test order in a private window after accepting cookies.
- Check that Purchase arrives from the browser and the server, with the same value and currency.
- Remove the test code, or real purchases keep going to Test Events only.
Common problems
| Symptom | Likely cause |
|---|---|
| No events at all | Consent not given, or you are logged in as an administrator |
| Purchases counted twice | A second plugin or Tag Manager also sends TikTok events |
| Server purchases missing | Token missing or wrong, test code still set, or WordPress cron not running |
| Events arrive with no value | The event is sent from a button instead of the order |
| Works for you, not for visitors | Page cache or a JavaScript optimizer delays the pixel |
A small gap between TikTok and your shop is normal: blockers, declined consent and attribution windows all play a part.

