How to find your Meta pixel (dataset) ID
Updated By Adcato
In Meta Events Manager, open Data Sources, select your dataset (the pixel), and open its Settings tab: Meta says it shows the ID and the owner of your data. The same ID is written twice in the pixel's base code on your website. If your pixel was linked to a dataset, for example when Meta converted it, the dataset ID and the pixel ID are the same number.
Find it in Events Manager
- Go to Meta Events Manager.
- Click Data Sources in the menu on the left.
- Select your dataset.
- Open the Settings tab. The ID and the owner of the data are shown there.
If you have several datasets, check the owner on the same tab. It tells you which business portfolio the dataset belongs to, which matters before you share it.
Find it in your website's pixel code
Meta's developer guide says the pixel's base code "contains your Pixel's ID in two places":
- in the line fbq('init', '...'), where the ID replaces the dots
- in the address of the small image inside the noscript part, after tr?id=
Meta recommends adding the base code between the <head> tags of every page you track, so the ID shows up in your page's source. If the pixel was installed through a tag manager or a platform's partner integration, look for it there instead.
Pixel ID or dataset ID?
Meta is merging website, app, offline and messaging events into one view in Events Manager, called a dataset. Agencies and developers may use either word.
- The same number: Meta says your dataset ID "will be the same as your existing pixel ID if an existing pixel is linked to your dataset", for example when your pixel was automatically converted to a dataset.
- A new number: a dataset gets a new ID when no existing pixel is linked to it, for example one created to connect offline events.
Meta says you can use the dataset ID like a pixel ID, for example to set up the Meta Pixel or the Conversions API. So if your developer asks for the pixel ID and you only see a dataset, send the dataset's ID.
Who owns it
The Settings tab shows the owner. Check it before anything else. Meta says "you can't delete a dataset or transfer it to another business portfolio", so a dataset an agency created in its own portfolio stays there. If the owner is your agency, see how to get your Meta assets out of an agency's business portfolio.
What to send your agency instead
An agency that runs your ads needs the dataset shared with its business portfolio, not the ID in an email. Someone with full control of your business portfolio shares it under Settings > Data sources > Datasets > Assign partners, using the agency's business portfolio ID. The first time you share with a business, Meta asks you to declare the business relationship and reaffirm its business tools terms, and the agency has to agree to the request. The full steps are in how to share a Meta pixel (dataset) with an agency.
The access token is something else
If you or a developer set up the Conversions API, you will also see an access token. It is not the ID. Meta's developer guide says it is generated in Events Manager, on the pixel's Settings tab under Generate access token, is passed with every API call, and that the link is only shown to people with developer privileges for the business. Our advice: treat it like a password, and give it only to the person who sets up the Conversions API. An agency that only runs your ads needs the dataset shared, not the token.
Ask your client with one link
Send your client one link. They sign in with Facebook, pick their Meta pixel and confirm. You see where each client stands on your dashboard.
A Meta pixel takes one more step on Meta’s own screen: the box shows the step and checks that the access arrived.
In preview: sign-up is by invitation, and until Meta and Google approve the app, it works with simulated and test accounts only.
Start freeQuestions
Is the dataset ID the same as the pixel ID?
Not always. Meta says the dataset ID is the same as your pixel ID when an existing pixel is linked to the dataset, for example when the pixel was converted to a dataset automatically. A dataset created without a pixel gets a new ID.
Is my pixel ID secret?
No. It sits in the base code on your website, so anyone who views your page's source can read it. Seeing your events or using the dataset in ads takes access to the dataset, which someone with full control of your business portfolio has to share.
Does my agency need the ID or access to the dataset?
Access to the dataset, shared with its business portfolio. The ID alone does not let the agency see events or use the dataset in campaigns.
I have two pixels. Which one is in use?
The one whose ID is in your website's base code, and which shows recent activity in Events Manager. Compare the ID in the code with the ID in each dataset's Settings tab.
Checked against
- About Meta Events Manager (Meta Business Help Center), read
- About datasets in Meta Events Manager (Meta Business Help Center), read
- How to set up a Meta Pixel and events on your website (Meta Business Help Center), read
- Get started with the Meta Pixel (Meta for Developers), read
- Create a dataset for your Meta Pixel in Meta Business Suite (Meta Business Help Center), read
- How to add a partner to a dataset in your business portfolio (Meta Business Help Center), read
- About sharing controls for datasets, Meta Pixel, apps and offline event sets (Meta Business Help Center), read
- Get started with the Conversions API (Meta for Developers), read