How do I install the Facebook Pixel with Google Tag Manager?

January 12, 2017
cerebro

AdobeStock_100516633_small
If you are using Google Label Manager to control tags for your website and want to set up the Facebook pixel, follow these steps:

Install the Facebook pixel base code:

  1. Open your Google Tag Manager.
  2. Select your website’s container, then click Add a new tag.
  3. Click Custom HTML Tag.
  4. Give it a name.
  5. In Facebook, go to your Facebook pixel page.
  6. Click Actions > View Pixel Code.
  7. Copy the entire pixel base code, as seen below.
    Pixel base code
  8. Back in Google Tag Manager, paste the code in the HTML container.
  9. Click the Advanced Settings dropdown and select Once per page under Tag firing options.
  10. Under Fire On, select All Pages.
    Facebook pixel base code
  11. Click Create Tag.

 

Create action-specific tags:

  1. Now that you have your base code set, you can create specific tags for the different types of pages and events on your website (ex: product page, add to cart button, purchase page). First, create a new custom HTML tag.
  2. Name your tag, then insert just the snippet of code relating to that event, plus any other variables you want to track. Keep in mind your variables (ex: product_ids and product_name) may be different from the example below.
  3. Under Advanced Settings, select Once per event under Tag firing options.
  4. Under Tag Sequencing check the box and select your base code tag, to ensure this tag fires after your base code.
  5. Under Fire On, select the trigger that makes sense for your site.
  6. Click Create Tag.
    Product Pixel, Facebook code
  7. In the same way, create tags for the other events on your website (ex: add to cart, purchase). See the examples below for a typical website.
    Add to Cart Facebook pixel
    Purchased Facebook pixel
  8. When you’re done, your Facebook tags list could look something like the example below. Click Publish to push the tags live.

Publish

Check if your pixel is working:

Once you’ve uploaded all your events, you should check if your pixel is firing correctly. To check that your pixel is working properly on your live site:

  1. Navigate to the web page the pixel was placed on. If it’s working, the pixel will send information back to Facebook and you’ll be able to see activity in the Facebook Pixel page in your Ads Manager. Your pixel’s status will also be set to Active. Keep in mind that the activity column reports all conversion events regardless of whether or not these events are associated with an ad.
    Graph
  2. If it didn’t work (No activity yet, No recent activity), use the Facebook Pixel Helper to troubleshoot the problem. Keep in mind you have to be using the Chrome browser for it to work. Once the Pixel Helper is installed, a small icon will appear next to your address bar. Navigate to your website in your Chrome browser and click the Pixel Helper icon.
    Pixel Helper icon
  3. The popup will tell you what pixels were found on the page and whether they have loaded successfully. If not, it’ll give you tips on why it may have failed.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *