How to Add a Meta (Facebook) Pixel to Your Website
Add your Meta (Facebook) Pixel to your AgentFire website, fix the 'tag not allowed' error, track leads on a thank-you page, and check that it works.
The Meta Pixel lets Facebook and Instagram ads see who visits your website and who becomes a lead. You get the code from Meta, then paste it into one box on your website.
Get your Pixel code from Meta
In Meta Events Manager, create a pixel (or open the one you already have) and choose to install the code manually. Copy the code Meta shows you. Meta's own steps are here: Set up a Meta Pixel.
Meta now groups pixels under Datasets. If you already have a pixel, use that one rather than making a new one.
Add the code to your website
Remove the noscript part
Meta's code ends with a part that starts <noscript> and ends </noscript>. Cut that part out, from <noscript> to </noscript>: the head box won't save with it in. If you want to keep it, paste it into Body before closing tag instead. It only matters for visitors who have JavaScript turned off.
After you save, you may see a message asking whether to turn on the cookie banner. You can turn it on yourself: see How to Set Up the Cookie Banner. With the banner on, the pixel only runs for visitors who accept cookies.

Track leads on a thank-you page (optional)
If your form sends people to a thank-you page, you can tell Meta that each visit to that page is a lead. The pixel must already be on your site (above).
This box is only for event lines like the one above. Never paste your whole pixel code here.
Check that it works
Add Meta's free Meta Pixel Helper extension to Chrome. Open your website, accept cookies if a banner shows, and click the helper. It should show your pixel and a PageView. In Events Manager, it can take a while before Meta shows the pixel as active.
Common Questions
Last updated



