Saturday, October 14, 2017

Getting Started with Facebook Pixel

In this article, we'll cover how to install a pixel on your website, track actions on your site that you care about, and make sure that your pixel is working. To learn more about pixel before getting started, check out the benefits of installing a Facebook pixel.

Before you begin

  • You'll need a website for your business.
  • You must be able to update your website's code.

Create a Facebook pixel

  1. Go to your Pixels tab in Ads Manager.
  2. Click Create a Pixel.
  3. Click Create in the box that appears to finish creating your pixel.

Add the Facebook pixel to your website

Once you've created your pixel, you're ready to put the Facebook pixel code on your website. Choose the statement below that best fits how you make updates to your website's code for instructions:
Someone else makes changes to my website
I update my website's code
My site uses a tag manager or is hosted on a popular website platform

Track actions that matter to your business

After you've placed the pixel your website, add events to track specific actions people take on your website.
About events
Events are actions that happen on your website (like when someone makes a purchase). To track an event, you'll need to place a piece of code on your website to help Facebook understand that someone has taken an action.
Set up events on your website
  1. Go to the Pixels tab in Ads Manager.
  2. Click Set Up Pixel.
  3. Click Manually Install the Code Yourself.
  4. Click Continue.
  5. Click Install Events.
  6. Click the toggle icon next to an event you'd like to track.
  7. Select Track Event on Page Load or Track Event on Inline Action.
    1. Track Event on Page Load: Choose this option if the action you care about can be tracked when someone lands on a certain page, like a confirmation page after completing a purchase.
    2. Track Event on Inline Action: Choose this option if the action you want to track requires someone to click something (like an add to cart or purchase button).
  8. Add event parameters, like Conversion Value or Currency, to measure additional information about your event (Recommended)
  9. Copy this event code and paste it on the relevant page of your site. Be sure not to modify the pixel code you've already placed in the header of your website.
    1. For page load events: place the code just below the closing header section of the page (for many websites, this will be right after the opening <body> tag).
    2. For inline action events: add the event code between script tags next to the action you want to track (like a button).
If you'd like your Facebook pixel to fire on specific button clicks, you'll have to update the code to tie an event to an action. Learn more in our developers site, under the Track In-Page Events section.
You've now finished setting up an event on your website. Repeat these steps for any other event listed that you'd also like to track.
Don't see the event you want to track?
If you want to track events not listed here, then see how to use custom events. Unlike the events featured above, custom events can't be used for tracking and optimization without additional action.
If you'd like your Facebook pixel to fire on specific button clicks, you'll have to update the code to tie an event to an action. Learn more in our developers site, under the Track In-Page Events section.

Make sure your pixel's working correctly

The Facebook Pixel Helper is a troubleshooting tool that helps you find out if your pixel is working correctly. It's a Chrome plugin you can use to see if there's a Facebook pixel installed on a website, check for errors, and understand the data that's coming from a pixel.
Install the Pixel Helper
Before getting started, you'll need to have the Chrome web browser. If you don't have it yet, install the Chrome browser then follow these steps:
  1. Go to the Chrome web store and search for the Facebook Pixel Helper.
  2. Click + Add to Chrome.
  3. "
  4. Click Add extension.
Once you've successfully installed the extension you'll see a notification that the plugin has been added to Chrome and a small icon will show in your address bar.
Check that your pixel's working
  1. After you've installed the Pixel Helper, click the Pixel Helper icon in the address bar.
  2. Check the popup to see any pixels found on that page, and whether they've been set up successfully.
If the Pixel Helper finds a pixel on your site and there are no errors, then you're ready to start creating Facebook ads with your pixel.
If you see a notification that no pixels were found on your site or that there's an error, then check out the troubleshooting section below for more help.
Troubleshooting Pixel Errors
The Facebook Pixel Helper reports common errors than can happen when you install a pixel on your website. These errors mean that the person who manages your website will need to fix something for your pixel to start working correctly.