Meta Pixel Generator

From dataset ID to finished snippet, without editing code by hand.

FREE · NO SIGN-UP · RUNS ON YOUR DEVICE

Assembled in this tab only

  • 8events on offer
  • 4output styles
  • 1ID, checked live
  • 0uploads
In practice

What you can count on

  • 0network calls
    • The generator never contacts Meta
    • Your ID stays on your device
  • 15–16digits
    • The only shape a dataset ID takes
    • Anything else is flagged as you type
  • 8events
    • ViewContent through Subscribe, each optional
    • Parameters appear only when you fill them
Specification

Meta Pixel Generator at a glance

Input
A dataset ID, 15–16 digits
Output format
HTML, PHP or Liquid, plus a .txt
Events
8 events, 4 optional fields each
Blank fields
Omitted, never faked
Purchase
currency + value or nothing
What is not checked
Existence and firing
Uploads
Nothing leaves your device
Price
Free
Account required
No
Where it runs
On your device
How to

How to use Meta Pixel Generator

  1. 1

    Drop in the ID

    Paste the dataset ID. If the shape is wrong the box says so before you copy anything.

  2. 2

    Pick the events

    Tick the actions worth reporting and fill the parameters you actually know.

  3. 3

    Wrap and copy

    Choose the output style for your platform, copy the block, or save it as a .txt for the person doing the install.

Questions

Frequently asked questions

What does this generator actually produce?

The official fbq base snippet with your ID inside, the noscript image — a one-pixel fallback for visitors with JavaScript off — and one call per event you ticked, wrapped for the platform you chose.

Is the dataset ID the same as the pixel ID?

Yes. Events Manager renamed the container, not the number. Whichever name your dashboard uses, the 15–16 digits are what goes in here.

Which output do I pick for WordPress?

The WordPress option — it wraps the snippet in a wp_head action for a child theme functions.php. If you run a tag plugin instead, use the plain HTML version in its header box.

Where does the Shopify version go?

Online Store → themes → Edit code → layout/theme.liquid, just before the closing head tag. One paste covers every page of the store.

Why are there no empty parameters in my code?

Because an empty parameter is worse than none: value set to an empty string breaks value reporting. What you leave blank is left out.

Does the generator send anything to Meta?

No. It writes text in your browser tab. The first request to Meta happens on your site, once the code you pasted there loads.

Background

From Generated Code to Reported Numbers

One box takes the dataset ID and checks its format on the spot. Below it, the eight standard events wait behind checkboxes, and four output styles cover a plain page, Tag Manager, WordPress and Shopify.

  • Paste the base code once per site, then move event calls to the pages they belong to.
  • Use Test events in Events Manager to watch the first hits arrive before trusting reports.
  • Keep currency codes to the three-letter standard — HKD, USD — or value reporting misreads.
  • Re-copy from here after changing events; hand-editing a live snippet is where typos start.

Full specification

Specification of the Meta Pixel Generator tool
InputA dataset ID — the number Events Manager shows for what used to be called the pixel.
Output formatHTML with noscript, a Tag Manager script, WordPress PHP for functions.php, or a Shopify theme.liquid block — plus a .txt download.
EventsThe eight standard web events with value, currency, content_name and content_ids as optional fields.
Blank fieldsLeft out of the generated call entirely — no empty strings, no zero values invented.
PurchaseWritten only when currency and value are filled, matching what Meta will accept.
What is not checkedWhether the ID exists, or whether the pixel later fires — only Events Manager can see that.
UploadsNone. No request leaves this page.
PriceFree
Account requiredNo
Where it runsIn your browser tab.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS