Meta Pixel, Conversions API and attribution

How do I create a dataset in Meta Events Manager?

A dataset is what Events Manager calls the Pixel. How to create one, where the ID goes, and why a site with an existing Pixel should not create a second.

Published

A dataset in Meta Events Manager is the container that holds your event data under one ID, and for a website advertiser it is what the Pixel is called now. You create it once, in the business portfolio that should own the data, then use its ID in the Pixel base code and in every Conversions API request. If the website already has a Pixel, you already have a dataset: use that one instead of creating a second.

A dataset is the Pixel, under a new name

Meta used to give each integration its own identifier: a Pixel ID for the website, an app ID for the app, an offline event set ID for uploaded events. Meta now moves each web and app integration into its own dataset automatically, keeps the old IDs, and lets you merge web, app, offline and messaging events into a single dataset when you want them in the same place.

That history explains the vocabulary. The container is a dataset, the browser code is still the Meta Pixel, and for a website dataset the ID in the base code is the old Pixel ID. Meta dataset has the full definition and the list of integrations that can send events into one.

What sends eventsIntegration
A websitethe Meta Pixel and the Conversions API
An appthe Facebook SDK, mobile measurement partners, the App Events API
A shop or a call centreCSV uploads and the Conversions API
Business chatsthe Conversions API for messaging events

Two checks before you create anything

Does this website already have a Pixel? If it does, use it. Meta wants the same Pixel ID on browser events and on server events, and a second Pixel on the same landing page causes the double firing described below. Look in the data sources list in Events Manager before you build a new object.

Which business owns it? A dataset belongs to one business portfolio. If you are an agency, create it in the client portfolio and work through shared access, so that the event history stays with the business that paid for it when the contract ends. The same rule applies to the domain: verify it in the client portfolio, then have the client share it with yours. Meta Pixel setup for lead generation covers the ownership pattern step by step.

How to create a dataset in Events Manager

  1. Open Events Manager and look at the data sources list. Note the name and the ID of every Pixel that belongs to this business, so you do not create a duplicate.
  2. Choose the business portfolio that will own the data. For a client account, that is the client portfolio, not the agency one.
  3. Create the dataset for the website. Meta’s Help Center now describes this as creating a dataset for your Meta Pixel, and the object it produces is the one the base code refers to.
  4. Copy the ID. It appears in the dataset settings and it is the number you paste into the base code.
  5. Install the base code on every landing page you track, including the thank-you page if you use one.
  6. Connect the Conversions API to that same ID, so the browser and the server describe the same dataset.

The order matters for one reason: the ID is what ties everything else together. If you install the code first and create the object later, you end up editing templates twice.

The ID, and where it goes

WhereWhich IDWhere it comes from
Meta Pixel base codethe dataset ID, same as the Pixel IDthe dataset settings
Conversions API, website events/{PIXEL_ID}/eventsthe same dataset
Conversions API, app, offline and messaging events/{DATASET_ID}/eventsthe same dataset
Ad level tracking and website optimisation in Ads Managerthe dataset IDthe same dataset
Dataset Quality APIdataset_id, described by Meta as the ID of the dataset (Pixel)the same dataset

One number, several names. The reason to keep it in one place is that a mismatch between the ID in the browser and the ID on the server breaks deduplication silently: Meta receives two events that it cannot pair, counts both, and reports a cost per lead that is lower than what you actually paid.

Connecting the Conversions API to the same dataset

With the dataset created and the base code live, the server side is a matter of one setting and one secret.

In the dataset settings, the Conversions API section holds the option to generate an access token. That token is what your server uses to post events, and it must never appear in the landing page’s JavaScript. Keep it in an environment variable on the server, one token per client if you run several accounts.

Then send the Lead from the server that received the form, with the same event name and the same event_id as the browser copy. Meta recommends this redundant setup and counts the two copies once when the names match and the IDs match within 48 hours. The failure mode to watch is the common one: the browser generates one ID and the server generates another, so the pair never matches and both copies count.

When you do need a new dataset

A new dataset is the right move in three cases: the work is for a different business, the existing dataset was set up by someone who no longer has access and nobody can recover it, or you are migrating a website to a new domain and want a clean history. In the second case, Meta’s own advice is to leave the old dataset in place rather than delete it, because deleting one removes the event history, the access token and every website audience built on it. How do I delete a Meta dataset or Pixel? explains what a delete actually takes with it.

What you should not do is create a second dataset for the same website to “start fresh” while the old one still fires. That is the double firing case, and it is worse than a messy history: every lead is counted twice, so the delivery system learns from inflated numbers and the budget goes wherever the duplicate count is highest.

After creation, the three checks that matter

Open the Overview tab and confirm that events arrive within about 20 minutes of being sent. Open the Event Match Quality score for the Lead event rather than the PageView, and aim for 6.0 or higher where the data allows. Then watch the deduplication rate for the Lead: a low overlap between browser and server is the signature of two IDs that were never the same string. The rest of the funnel, from attribution settings to URL parameters, is in Meta Pixel, Conversions API and attribution.

Questions on this topic

All questions on this topic →

FAQ

Do I need a dataset if I only track a website?+

Not a new one. Meta says that if you only track a website you do not need to create a dataset at all: install the Pixel and use its ID for the Conversions API as well. A dataset is required when you want app, offline or messaging events in the same container.

Is the dataset ID the same as my Pixel ID?+

For a dataset built on an existing Pixel, yes, it keeps the Pixel ID. A dataset created from an app with Create new, or one made for offline events, gets a new number instead. Check the ID shown in Events Manager rather than assuming.

Can two datasets share one website?+

They can both be installed, but you should not do it by accident. Two Pixels on the same landing page send two copies of every event, and a Lead counted twice makes the cost per lead in Ads Manager look better than it is.

What happens to a dataset if the agency leaves?+

If the dataset was created in the client business portfolio and shared with the agency, it stays with the client and the agency loses access. If the agency created it in its own portfolio, the event history and the audiences go with the agency.

Ready to find out what
converts, for real?

Free to start.

Start free →