Skip to main content

How to create a Facebook Pixel (Dataset) and build retargeting audiences

This article explains how to create a Meta (Facebook) Pixel dataset, install and verify the Pixel on a website, and use the collected data to build retargeting and lookalike audiences for Meta ads.

Updated over 3 months ago

Who this is for / when to use

Use this process when a business needs to track website activity in Meta, build website-based retargeting audiences, or generate lookalike audiences for paid advertising.

Step 1: Create a Dataset in Meta Business Settings

A Dataset is the container Meta uses to store Pixel event data and associate it with the correct ad account.

  1. Log in to Facebook Business Manager

  2. Open Business Settings

    • Click the Settings (cog) icon in the bottom-left

  3. Navigate to Data Sources → Datasets

  4. Click Add (top-right)

  5. Enter a clear dataset name (example: Brand – Website Pixel)

  6. Connect the Ad Account

    • Open the dataset

    • Click Connected Assets → Connect Assets

    • Select Other Business Assets

    • Choose the correct Ad Account

    • Click Add

Step 2: Install and verify the Meta Pixel on your website

Installing the Pixel connects website activity to the dataset so Meta can record events such as page views, leads, and purchases.

  1. Open Events Manager

    • In Business Manager, click the hamburger menu (top-left)

    • Go to Advertise → Events Manager

  2. Select the correct Dataset

    • Click Data Sources

    • Choose the dataset created in Step 1

  3. Install the Pixel using one method

    • Manual HTML install

      • Copy the Pixel base code

      • Paste it inside the <head> section on all website pages

    • Partner Integration (Shopify, WordPress, etc.)

      • Follow the platform’s Meta Pixel integration steps

    • Google Tag Manager

      • Create a new Meta Pixel tag

      • Publish the GTM container

  4. Verify the Pixel is working

    • Install the Meta Pixel Helper Chrome extension

    • Visit the website and confirm the Pixel and events are detected

Step 3: Create audiences using Pixel data

Once events are collected, Meta can build audiences based on visitor behavior.

  1. Open the Meta Launcher under the Advertise tab

  2. Go to Targeting → Retargeting

  3. Create a Website Custom Audience

    • Click Create Website Audience

    • Select your Pixel/Dataset as the source

    • Choose criteria:

      • All website visitors, or

      • Visitors to specific pages

    • Set the lookback window (example: last 30 days)

    • Click Create Audience

  4. Create a Lookalike Audience (optional)

    • Go to the Lookalike Audience tab

    • Click Create Lookalike Audience

    • Select the Custom Audience as the source

  5. Confirm availability

    • Audiences appear in Retargeting and Lookalike Audience tabs

    • Audiences can be included or excluded in campaigns

Common issues and fixes

Pixel Helper shows “No pixel found”

This usually means the Pixel code is missing, placed outside the <head>, or not published.

Fix

  • Confirm the Pixel base code is in the <head>

  • Publish changes in GTM or the website builder

  • Test again in an incognito browser window

Events Manager shows no activity

This typically happens when the wrong dataset is selected or the Pixel is not firing.

Fix

  • Verify the selected dataset in Events Manager

  • Check multiple pages, not just the homepage

  • Disable ad blockers during testing

Dataset is not connected to the correct Ad Account

Unlinked ad accounts prevent audience usage and optimization.

Fix

  • Go to Business Settings → Data Sources → Datasets → Connected Assets

  • Connect the correct Ad Account

Audience size is too small

New Pixels or strict rules can limit audience population.

Fix

  • Broaden criteria (all visitors)

  • Increase lookback window (60–180 days)

  • Allow more time for data collection

Did this answer your question?