Adding a Facebook Pixel to your website

  • Last updated on October 7, 2024 at 8:05 PM

The Facebook pixel is a snippet of code that allows you to track visitor activity on your website. There are several actions that you can take once this pixel is 'activated' by your website visitor by typically retargeting them with a Facebook Ad is the common action.

Note - For a detailed breakdown on everything Facebook Pixel related please refer to Facebooks official support article here - https://developers.facebook.com/docs/facebook-pixel

How do I add a pixel to my website?

Step #1 - Create a Pixel 

  1. Go to Events Manager.
  2. Click Connect Data Sources and select Web.

  3. Select Facebook Pixel and click Connect.

  4. Add your Pixel Name.
  5. Enter your website URL to check for easy setup options.
  6. Click Continue.

Step #2 - Add the pixel to your website

  1. Go to Events Manager.
  2. Select the pixel you want to set up.
  3. Click Continue Pixel Setup.
  4. Select Install code manually.
  5. Copy the pixel base code.
  6. Paste the pixel base code in the Website Analytics section of your AttractWell website. To find this field:
    1.  Open the Website menu
    2. Click on Customize My Site
    3. Scroll to the bottom and click "Advanced Options" to expand it
    4. The Website Analytics field will appear there for you.

  7. Click Save Changes in AttractWell, then return to your events manager and select Continue.
  8. Optional: Toggle on Automatic Advanced Matching and verify the customer information you want to send.
  9. Click Continue.
  10. Add events using the Event Setup Tool or by manually adding code to your website.
  11. Click Done

Step #3 - Test your Pixel

Once you have successfully installed the Pixel you can test it by selecting Test Events from the summary screen of your events manager.

(Advanced) Step 4 - Track Conversion Events

If you would like to track who is registering as a lead or making a purchase via a landing page or custom page, that can be done.

Tracking Conversion Events On A Landing Page

First, open the landing page editor by going to the Contacts menu and clicking the Landing Page link. Then, click Settings, then click Page Settings as seen in this screenshot.


Next, click Show Advanced. If this does not appear, your plan doesn't support this feature.Then, in the Post-Registration Code field, enter the following code if you'd like to track a lead. This will run if the user registers on the page.

<script>
fbq('track', 'Lead');
</script>

If you'd like to track a different event, see this list of events from Facebook.

Tracking Conversion Events On A Custom Page

First, open the custom page editor by going to the My Site menu, clicking Settings, then clicking Custom Pages. Choose the page you want to edit or make a new one, then click the Settings button as shown below.

Next, click Advanced Settings to open it.

Next, put the following code in the Custom HTML Tags - Footer field if you'd like to track a lead. This will run if the user registers on the page.

<script>
fbq('track', 'Lead');
</script>

If you'd like to track a different event, see this list of events from Facebook.

Facebook Helper Plugin

If you are a Google Chrome user you can add a plug-in to your browser that will automatically detect when you are visiting a webpage with a Facebook Pixel applied. This is a great way to confirm that your pixel is 'firing' properly 

https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en