Skip to main content
Track Users with Facebook Pixel

Learn how to include pixels in your project or site for tracking.

Deepa Prabhu avatar
Written by Deepa Prabhu
Updated over 7 months ago

The Facebook Pixel is an analytic tool for measuring the success of Facebook Ad campaigns. Before attempting this, we recommend having some experience with HTML.

On EngagementHQ, you can use Facebook Pixel in two ways:

Please note that Facebook Pixel tracks site users, which can result in a loss of anonymity. Your site’s Privacy and Cookies policies should address any privacy concerns.

For both options, you’ll need to paste in a script which you’ll receive once you set up Facebook Pixel. Additionally, the data you collect will be available on Facebook rather than EngagementHQ reporting.

The snippet will look something like this, but please note that you must use the one you receive from Facebook.

<script>(function() {

var _fbq = window._fbq || (window._fbq = []);

if (!_fbq.loaded) {

var fbds = document.createElement('script');

fbds.async = true;

fbds.src = '//connect.facebook.net/en_US/fbds.js';

var s = document.getElementsByTagName('script')[0];

s.parentNode.insertBefore(fbds, s);

_fbq.loaded = true;

}

})();

window._fbq = window._fbq || [];

window._fbq.push(['track', '77778787878', {'value':'0.00','currency':'AUD'}]);

</script>

<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?...." /></noscript>

Add the snippet to your project

Once you have your code snippet ready and copied:

  1. Go to the relevant project, select Add Widget, and choose Custom from the list.

  2. Rename the widget to indicate what it’s for and check Hide title, as the widget’s content will be blank once you save.

  3. Select < > to open Code View and paste in the code snippet.

  4. Select < > again to close Code View and Save & Close the widget.

  5. Drag and drop the widget to the top of your widget list.

This widget won’t display on your live project page but will be active. If you need to edit the code, repeat steps 3 and 4 again, as you cannot adjust the existing snippet.

Add the snippet to your site

You can apply the same script to your entire site if you prefer. With the code snippet copied:

  1. Go to Site Settings > Custom Code.

  2. Paste the script into the Adding code to <head> field.

  3. Save your settings

The script will now be automatically injected into the <head> tag of each page on your site.

If you need assistance with adding Facebook Pixel, please contact our support team via chat or email.

What else?

Did this answer your question?