Facebook Pixel Code Generator

The Facebook pixel under its old name, generated the current way.

FREE · NO SIGN-UP · RUNS ON YOUR DEVICE

Nothing typed here is sent out

  • 8events to tick
  • 4paste targets
  • 15–16digits checked
  • 0sent to Meta
In practice

What you can count on

  • 0requests out
    • Your ID is never transmitted
    • The page makes no network calls
  • 1base code
    • One snippet per site, installed once
    • Two copies would double-count each visit
  • 4wrappers
    • Plain HTML and Tag Manager
    • WordPress PHP and Shopify Liquid
Specification

Facebook Pixel Code Generator at a glance

Input
One 15–16 digit ID
Output format
HTML, PHP or Liquid, plus a .txt
Events covered
All 8 standard events
Empty parameters
Blank boxes emit nothing
Purchase
Needs currency and value
ID validation
Format only, not existence
Uploads
Nothing leaves your device
Price
Free
Account required
No
Where it runs
On your device
How to

How to use Facebook Pixel Code Generator

  1. 1

    Get the ID

    In Events Manager open Data sources and copy the 15 or 16 digit number under your dataset.

  2. 2

    Choose the events

    Tick what the site should report. Leave a parameter box empty and it stays out of the code.

  3. 3

    Take the code

    Switch to the wrapper you need, copy the block, and paste it where that platform expects it.

Questions

Frequently asked questions

Is the Facebook pixel discontinued?

No. It is now filed inside a dataset in Events Manager, and the interface says dataset ID — but that ID is the pixel ID, and the fbq snippet is unchanged.

Is a Facebook pixel different from a Meta pixel?

Same thing. The product was renamed with the company; the code, the ID format and Events Manager are identical either way.

Where does the code go on a plain website?

Just before the closing head tag, on every page you want measured. The HTML version brings the noscript image with it — a one-pixel fallback for visitors with JavaScript off.

How do I put it into Google Tag Manager?

Switch the output to Tag Manager, add a Custom HTML tag, paste, and set the trigger to All Pages. Publish the container and check Test events.

Why does my Purchase event not show up?

It is only written once currency and value are both filled — Meta refuses a Purchase without them, so an incomplete call would report nothing anyway.

Can this page verify my pixel is firing?

No — it writes code, it does not talk to Meta. Verify with the Test events tab in Events Manager or the Meta Pixel Helper extension.

Background

One Pixel, One Install

Everyone still says Facebook pixel; Meta says dataset. Same number, same code. Paste the ID, tick events, and take the block as HTML, a Tag Manager tag, WordPress PHP or Shopify Liquid.

  • Install the snippet once — theme or Tag Manager, not both — or every visit counts twice.
  • Event calls belong on the pages they measure; only PageView rides on every page.
  • Confirm the install in Test events before you build an audience or a report on it.
  • The ID is not a secret, but the numbers it reports are only as clean as the install.

Full specification

Specification of the Facebook Pixel Code Generator tool
InputThe 15–16 digit ID from Events Manager — pixel ID and dataset ID are one number.
Output formatHTML, Tag Manager, WordPress PHP or Shopify Liquid text, with a one-click copy and a .txt download.
Events coveredThe eight standard web events, from ViewContent to Subscribe, each with its optional parameters.
Empty parametersNever emitted. A blank value box means no value key in the call at all.
PurchaseHeld back until currency and value are both filled, because Meta rejects it without them.
ID validationDigits and length only. This page cannot know whether the ID exists in your account.
UploadsNone. Everything is assembled in your browser tab.
PriceFree
Account requiredNo
Where it runsIn your browser tab.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS