Pixel Code Generator — Install Tracking Pixels

Enter your IDs and get one tracking pixel install snippet for Meta, TikTok, LinkedIn, Pinterest, X, Snap, Reddit, Microsoft Ads and Google Ads. You can make it wait for cookie consent, and you’ll see where to paste it on your platform.

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 Pixel Code Generator

  1. Tick each platform you use and enter its ID. You’ll find it in that platform’s ads manager.
  2. Choose where you’ll install the code, and whether it should wait for cookie consent.
  3. Copy the code and add it to your site, following the note under the code.
  4. Publish your site, then confirm that every pixel fires with the Tracking & Pixel Checker.

What is a tracking pixel?

A tracking pixel is a small piece of code from an ad platform. It tells the platform when someone visits your site, so you can measure your ads, build audiences and show ads to past visitors. The name comes from the tiny invisible image these tools once used.

Base code and event code

The base code goes on every page and records page views. Event code records actions such as a lead or purchase. Install the base code here first, then create your events with the Ad Pixel Event Code Generator.

Waiting for cookie consent

Choose After consent and the code goes inside a loadPixels() function. Nothing loads until your consent banner calls that function. It leaves out the no-JavaScript fallback, because that image would load without consent. Need a banner? Try the Cookie Consent Banner Generator.

Install it once

Don’t add the same pixel in two places, such as a theme setting and your own code. Double installs count every page view twice and skew your reports.

For a full walkthrough, read how to install a tracking pixel. Platforms sometimes update their code, so if yours gives you a different snippet in its ads manager, use that one.

Also searched as: tracking pixel generator, install tracking pixel, pixel install code, meta pixel code, tiktok pixel code, linkedin insight tag, pinterest tag code, retargeting pixel code.

Tools that pair well with the Pixel Code Generator

  • UTM Builder — Add utm_source, utm_medium, utm_campaign and friends to any link, see which GA4 channel the visit will land in, and tag a whole list of URLs at once.
  • Meta Conversions API Generator — Send conversions to Meta from your server.
  • GTM Snippet Generator — Enter your GTM container ID and get the Google Tag Manager install code for the <head> and <body>, with Consent Mode v2 defaults placed before the container so every tag inside it waits for consent.
  • A/B Test Significance Calculator — Did version B really win, or was it luck?

Frequently asked questions

Where do I find my pixel ID?
In each platform’s ads manager. On Meta it’s in Events Manager, on TikTok in Events Manager under Web Events, and on LinkedIn in Campaign Manager under Insight Tag.
Can I use several pixels at once?
Yes. Tick as many as you need, and the tool puts them in one snippet. Each one adds a little to your page load, so only keep the ones you use.
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.
How do I check that my pixel works?
Run your page through the Tracking & Pixel Checker, or use the test tool in your platform’s ads manager.
Can I install Pixel Code Generator as a web app and use it offline?
Yes. 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