TikTok Pixel Code Generator — Install the TikTok Pixel

Enter your ID and get the TikTok Pixel base code, ready to paste into your site. You’ll find your ID in TikTok Events Manager.

Updated
Install on
Load

Your install code

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the TikTok Pixel Code Generator

  1. Tick your platform and enter your ID.
  2. Choose where you’ll install it and when it should load.
  3. Copy the code and add it to your site.
  4. Open your site, then confirm that TikTok Pixel is firing with the Tracking & Pixel Checker.

What does the base code do?

It loads the platform’s script on your pages and records page views. Everything else, such as leads and purchases, builds on it, so add it to every page first. Then use the Ad Pixel Event Code Generator for your conversions.

Need step-by-step help? Read how to install a tracking pixel.

Also searched as: tiktok pixel code, tiktok pixel generator, install tiktok pixel, tiktok pixel base code.

Tools that pair well with the TikTok Pixel Code Generator

Frequently asked questions

Does this track purchases and leads?
Not by itself. The base code records page views. Use the Ad Pixel Event Code Generator to add events such as Lead and Purchase.
Do I need cookie consent for a pixel?
Often, yes. Rules such as the GDPR usually require consent before marketing cookies load. Choose After consent to get code that waits for it, and check what applies to your site.
Is my pixel ID sent to devpack?
No. The code is built in your browser.
Can I install TikTok Pixel Code Generator as a web app and use it offline?
Yes. TikTok Pixel Code Generator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools