T

TikTok

TikTok Pixel

Track TikTok ad performance and build high-intent audiences.

The TikTok Pixel is a piece of JavaScript code that you place on your website to measure the actions people take after seeing your TikTok ads. It enables conversion tracking, campaign optimisation, and custom audience creation.

Why you need it

TikTok has over 1 billion active users. Without the pixel, your TikTok ads cannot optimise for conversions, you cannot retarget website visitors, and you cannot measure actual ROAS from your campaigns.

How to install

In TikTok Ads Manager, go to Assets → Events → Manage → Create Pixel. Select Web Events → TikTok Pixel. Copy the pixel code and paste it in the <head> of every page. For e-commerce platforms, use TikTok's native integrations (Shopify, WooCommerce, etc.).

How to verify

Use the TikTok Pixel Helper Chrome extension to confirm the pixel is firing. You can also check TikTok Ads Manager under Assets → Events → Web Events and look at the event activity table.

Common issues

The most impactful improvement is adding standard events beyond PageView. At minimum, add ViewContent on product pages, AddToCart on cart pages, and Purchase on order confirmation pages.

Installation code

<!-- TikTok Pixel Code -->
<script>
!function (w, d, t) {
  w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];
  ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"];
  ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};
  for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);
  ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e};
  ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";
  ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};
  var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;
  var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
  ttq.load('YOUR_PIXEL_ID');
  ttq.page();
}(window, document, 'ttq');
</script>
<!-- End TikTok Pixel Code -->

Replace YOUR_PIXEL_ID with your actual ID from the platform's ads manager.

Frequently asked questions

How do I know if TikTok Pixel is installed on my site?

Enter your domain in PixelSpy above for an instant check. You can also install the TikTok Pixel Helper Chrome extension or view your page source and search for "analytics.tiktok.com".

What events should I track with TikTok Pixel?

Start with the standard events: ViewContent (product pages), AddToCart (cart), InitiateCheckout (checkout start), and Purchase (order confirmation). These are sufficient for most e-commerce optimisation strategies.

Does TikTok Pixel work with Google Tag Manager?

Yes. TikTok provides an official GTM tag template available in the GTM community gallery. Search for "TikTok" in GTM's tag templates when creating a new tag.