> For the complete documentation index, see [llms.txt](https://help.doctorlogic.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.doctorlogic.com/docs/extensions/facebook-pixel.md).

# Facebook Pixel

The [Facebook Pixel](https://www.facebook.com/business/learn/facebook-ads-pixel) makes it easy to track conversions and determine the ROI of your Facebook (FB) advertising campaigns. Enabling this extension adds the FB Pixel code blocks to the *\<head>* of each page with the correct FB Pixel ID and event values.

![](/files/-LBRJ69opV8b4PQ9EKuE)

## Prerequisites

You must [create/setup a FB Pixel](https://www.facebook.com/business/help/952192354843755?helpref=faq_content#createpixel) in your FB advertising account. Make sure you enable the *Lead event* during setup. Once setup, please \[Contact Support]\(doc:contact-support) and include the FB Pixel ID in your request.

## Helpful Notes

* On all page loads (except Confirmation page) we fire the *Pageview* standard event.
* On the Thank You (Confirmation) page the *Lead* standard event.
* We do not *currently* support firing custom events/conversions.
* A site can have 1 or more FB Pixels providing they are not duplicate FB Pixel IDs.
* The FB Pixel only renders on production and Implementation URLs. It does NOT render on on-page editing URLs.

## Testing + Troubleshooting

It is recommended that you test/validate that the FB Pixel is correctly functioning. You can easily accomplish this by using the [Facebook Pixel Helper chrome extension](https://developers.facebook.com/docs/facebook-pixel/pixel-helper). Once installed, you'll get details about which FB Pixel and event was fired.

![](/files/-LBRKTqxgOB6SArIrhCk)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.doctorlogic.com/docs/extensions/facebook-pixel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
