How to Set Up the Meta Pixel and Find Your Dataset ID
Tracking

How to Set Up the Meta Pixel and Find Your Dataset ID

By IzeAds · Updated · 6 min read

To set up the Meta Pixel, open Events Manager, create a dataset (Meta's current name for the pixel), install its code on every page of your site or through a partner integration, and confirm events arrive in Test events. Your Pixel ID and Dataset ID are the same number, shown under the dataset name in Events Manager. For reliable sales data, pair the Pixel with the Conversions API.

What the Meta Pixel is (and why it is now called a dataset)

The Meta Pixel is a piece of JavaScript that runs on your site and reports what visitors do: view a page, add to cart, start checkout, buy. Meta uses those events to attribute results to your ads, optimize delivery toward people likely to convert and build audiences for retargeting and lookalikes.

In Events Manager, Meta now groups the Pixel and the Conversions API under a single "dataset" (conjunto de dados). The ID did not change: your old Pixel ID is your Dataset ID. When Ads Manager asks you to select a dataset, it is asking for your pixel.

Where to find your Pixel ID (Dataset ID)

  1. Open Meta Events Manager (business.facebook.com/events_manager).
  2. In the left menu, click Data sources and select your dataset.
  3. The ID is the number shown right below the dataset name. You can also find it under the Settings tab.
  4. Alternatively, go to Business Settings, then Data sources, then Datasets, and select the dataset to see its ID.

Checkout platforms such as Hotmart, Kiwify and Ticto only need this ID: paste it in the product's pixel settings and they fire the events on their checkout pages.

How to create the Pixel

  1. In Events Manager, click Connect data sources and choose Web.
  2. Name the dataset (use your brand or site name) and enter your website URL.
  3. Choose how to connect: Conversions API and Meta Pixel, Meta Pixel only, or a partner integration.
  4. Assign the dataset to the ad accounts that will use it in Business Settings, under Data sources, Datasets, Assign ad accounts.

How to install the Pixel on your site

Method 1: base code in the site header

Copy the base code from Events Manager and paste it inside the <head> of every page, before the closing </head> tag. Most site builders and WordPress themes have a field for header scripts. The base code fires PageView automatically on every page.

Method 2: Google Tag Manager

Create a Custom HTML tag with the base code, set it to fire on All Pages, and create additional tags for events such as Lead or Purchase with triggers on the right pages or actions. Publish the container when you are done.

Method 3: platform integrations

Shopify, WooCommerce, Wix and most checkout platforms connect the Pixel natively. Use the official integration when available: it usually sends the standard e-commerce events with value and currency already filled in.

Standard events you should track

EventWhen it firesUse in campaigns
PageViewEvery page loadRetargeting, traffic
ViewContentProduct or sales page viewedRetargeting, top-of-funnel optimization
LeadForm submitted or sign-upLead campaigns
AddToCartProduct added to cartMid-funnel optimization
InitiateCheckoutCheckout startedOptimization when purchases are still few
PurchaseOrder paid (with value and currency)Sales campaigns, ROAS, purchaser lookalikes

Always send value and currency with Purchase. Without them Meta cannot calculate ROAS or optimize for value. If you are an affiliate, check whether the platform sends the full product price or only your commission, because that changes the ROAS you see in Ads Manager.

Custom events and conversions

If a standard event does not describe the action, create a custom event, or a custom conversion based on URL rules (for example, a thank-you page). Prefer standard events whenever possible: Meta optimizes better on them.

How to check that the Pixel is working

  • Events Manager, Test events tab: open your site in a browser and watch the events arrive in real time.
  • Meta Pixel Helper, the official Chrome extension, shows which events fire on each page and flags errors.
  • Overview tab in Events Manager: check event volume, the event match quality and any diagnostics warnings.
  • Make a real test purchase or lead and confirm the Purchase or Lead event appears with the right value.

Error #1815430: ad set needs a dataset and a conversion event

The full message reads: "Your ad set needs a dataset (formerly called a pixel) and a conversion event selected to be published." It appears when a campaign optimizes for website conversions but the ad set has no dataset or event selected.

  1. Open the ad set and go to the Conversion section.
  2. Set the conversion location to Website.
  3. Under Dataset, select your pixel. If it does not appear, assign the dataset to this ad account in Business Settings.
  4. Under Conversion event, choose the event you want to optimize for, such as Purchase or Lead.
  5. If the event is missing from the list, make sure it has fired at least once from your site, then refresh Ads Manager.

Why the browser Pixel alone misses sales

The Pixel runs in the visitor's browser, so anything that blocks or limits the browser also blocks your data: ad blockers, iOS tracking restrictions, browsers that limit cookies, slow pages that close before the script loads, and checkouts hosted on another domain. The result is fewer reported sales, weaker optimization and worse lookalikes.

The fix: add the Conversions API (server-side)

The Conversions API (CAPI) sends the same events from your server straight to Meta, so they do not depend on the browser. Meta recommends running both: the Pixel and CAPI send the same event with the same event_id, and Meta deduplicates them.

IzeAds sets this up without code: it collects events from your own domains, receives sales from checkout platforms by webhook, sends them to Meta through the Conversions API and links each sale to the ad that generated it. Ads Manager then sees the sales that happened, not only the ones the browser reported.

Common setup mistakes

  • Installing the base code twice (theme plus plugin), which duplicates every event.
  • Firing Purchase on page load of a thank-you page that people can revisit, inflating sales.
  • Sending Purchase without value or currency.
  • Not assigning the dataset to the ad account, which hides it in Ads Manager.
  • Relying only on the browser Pixel for high-value sales.

Frequently asked questions

Where do I find my Meta Pixel ID?

In Events Manager, under Data sources: select your dataset and the ID is the number below its name. The Pixel ID and the Dataset ID are the same number.

What is a dataset in Meta Events Manager?

It is the current name for the pixel: a single container that receives events from the Meta Pixel, the Conversions API and other sources.

How do I fix error #1815430 in Meta Ads?

In the ad set, set the conversion location to Website and select a dataset and a conversion event. If the dataset is missing, assign it to the ad account in Business Settings.

Do I still need the Pixel if I use the Conversions API?

Meta recommends using both. The Pixel captures browser behaviour and CAPI guarantees delivery from the server; duplicates are removed with event_id.

How do I set up the pixel on Hotmart, Kiwify or Ticto?

Copy your Pixel ID from Events Manager and paste it in the product's pixel settings on the platform. The platform then fires the checkout and purchase events.

How can I tell if my Pixel is working?

Use the Test events tab in Events Manager or the Meta Pixel Helper extension while browsing your site, then confirm a real test conversion appears.

Ready to operate with more control?

Create campaigns in bulk, track sales in real time and protect your offers with IzeAds.

Create free account