Adding a Meta Pixel
Track visitor activity and improve your Facebook and Instagram ad targeting by adding the Meta Pixel (formerly Facebook Pixel) to your site.
The Meta Pixel is a piece of code that connects your B12 website to your Meta advertising account. Once installed, it tracks visitor activity on your site so you can measure how your Facebook and Instagram ads are performing, build audiences from your website visitors, and run retargeting campaigns. This article covers how to find your Pixel ID, add the pixel to your B12 website, and verify it's working.
Note: You'll need a Meta Business account and an existing Meta Pixel to follow these steps. If you haven't created a pixel yet, see Set up and install the Meta Pixel in Meta's Business Help Center to get started.
Getting your Meta Pixel ID
Your Pixel ID is a unique number that identifies your pixel. You'll find it in Meta Events Manager.
- Go to Meta Events Manager and sign in to your Meta Business account.
- Select Data sources from the left sidebar.
- Click your pixel's name to open its details.
- Your Pixel ID appears at the top of the page, below the pixel name. It's a string of numbers, typically 15–16 digits long.
- Copy the Pixel ID
Tip: You only need the Pixel ID number — not the full pixel base code. The AI Agent will use the ID to generate and install the correct script for you.
Adding the pixel to your B12 website
Once you have your Pixel ID, ask the AI Agent to add the pixel to your site. It will insert the required script into the head tag of every page, the standard location for tracking scripts.

Add the Meta Pixel to my website. My Pixel ID is [your Pixel ID]. The script should be added to the head tag so it fires on every page.
Tip: Because the pixel is added to the global head tag, it fires automatically on every page of your site. You don't need to add it to individual pages.
Caution: The AI Agent applies changes to your staging site first. You'll need to click Publish for the pixel to go live on your public website — it won't fire for real visitors until you've published.
Verifying the pixel is working
After publishing, you can confirm the pixel is firing correctly using the Meta Pixel Helper, a free Chrome extension from Meta.
- Install the Meta Pixel Helper from the Chrome Web Store.
- Visit your live B12 website, your custom domain or your yoursitename.b12sites.com URL.
- Click the Meta Pixel Helper icon in your browser toolbar.
- If the pixel is installed correctly, you'll see your Pixel ID listed with a green indicator and a PageView event recorded.
Note: The Pixel Helper only works on your published site, not on the B12 staging preview (the URL ending in -staging.b12sites.com). Make sure you've published your site before testing.
For additional troubleshooting, see the Pixel Helper documentation in Meta's developer docs.
Going further with Meta Pixel
The base pixel tracks page views automatically. Meta offers additional tools to get more from your tracking data, the following links go to Meta's own documentation:
- Standard events — track specific actions on your site such as form submissions, purchases, or lead captures
- Website custom audiences — build ad audiences from people who visited specific pages on your site
- Retargeting campaigns — re-engage visitors who viewed your site but didn't take action
- Conversions API — supplement browser-based pixel tracking with server-side events for more reliable measurement
Frequently asked questions
→Will the pixel track all pages on my site, or just one?
⇒All pages. When the AI Agent adds the Meta Pixel to your B12 website, it inserts the script into the global head tag, so it loads automatically on every page of your site.
→Do I need to republish my B12 website after adding the pixel?
⇒Yes. The AI Agent applies changes to your staging site first. Click Publish in the top toolbar to push the pixel live on your public website. It won't fire for real visitors until you've published.
→The Pixel Helper shows "No pixel found" — what should I check?
⇒First, confirm you're testing on your published site (your custom domain or yoursitename.b12sites.com), not the staging preview. If you're on the live site and still see no pixel, ask the AI Agent: "Can you confirm the Meta Pixel with ID [your Pixel ID] is installed in the head tag of my website?"
→Can I use Google Tag Manager to add the pixel instead?
⇒Yes. If you're managing multiple tracking scripts, adding the pixel through Google Tag Manager is a good approach, you can add all your scripts in one place and manage them without asking the AI Agent each time.