What Is TikTok Pixel
The TikTok Pixel is a snippet of JavaScript code that you install on your Shopify store. It tracks visitor behaviour: page views, product views, add to cart, and purchases. This data powers TikTok's ad targeting, lets you measure ROAS, and enables retargeting audiences.
Without the pixel, TikTok ads are essentially untargeted. With it, you can build lookalike audiences from your purchasers, retarget cart abandoners, and track which ads are generating actual sales versus just video views.
Installing via Shopify App
The easiest way to install the TikTok Pixel is via the official TikTok for Business app in the Shopify App Store. The app handles pixel installation and configures standard events automatically. Go to the App Store, search for TikTok, and follow the setup wizard.
During setup, you will connect your TikTok for Business account, select the pixel to use (or create a new one), and enable automatic event tracking. The app configures ViewContent, AddToCart, InitiateCheckout, and Purchase events without any coding.
Manual Installation
If you prefer manual control or the app is not available in your region, install the pixel via your theme.liquid file. Copy the pixel base code from TikTok Events Manager and paste it in the <head> section of theme.liquid.
For event tracking without the app, you will need to add event code to specific template files: product.json for ViewContent, cart.liquid for AddToCart, and the order confirmation page for Purchase events.
Events to Track
At minimum, track Purchase events. This is the conversion data TikTok needs to optimise your campaigns. AddToCart and InitiateCheckout events help TikTok understand your funnel and optimise for micro-conversions early in campaigns when purchase data is sparse.
ViewContent (product page views) is useful for building retargeting audiences of people who have shown interest in specific products. Combine this with a Purchase exclusion to build warm audiences.
Testing Your Pixel
Use TikTok's Pixel Helper Chrome extension to verify your pixel is firing correctly. Visit your store and check each event: view a product, add to cart, and complete a test purchase. The extension shows which events fired and whether the data looks correct.
Also check TikTok Events Manager after performing test actions. Events should appear within 30 minutes. If events are missing or showing duplicate fires, investigate your theme for any script conflicts.
TikTok Audiences
Once your pixel has accumulated sufficient data (typically 100+ events), build custom audiences in TikTok Ads Manager. Key audiences to create: all website visitors (90 days), product page viewers (30 days), cart abandoners (14 days), and purchasers (180 days).
Build lookalike audiences from your purchaser list for prospecting campaigns. A 1-3% lookalike from 500+ purchasers is typically your highest-performing TikTok prospecting audience.