How to Implement Facebook Pixel Tracking

If you would like to implement Facebook Pixel tracking with our app, follow these easy steps.

If you already have Facebook pixel tracking implemented via Shopify, and you decide to implement via our app, please be sure to remove your FB pixel from the Shopify store as your final step.

Step 1: Review Facebook Tags

Step 2: Update in GTM

Step 3: Match Your Product IDs

Step 4: Remove your Shopify FB Pixel

Step 5: Monitor your FB biz Account for Errors

Step 1. Review Facebook Tags

Once you've imported our container for either Plus or non-plus stores then you will have a set of Facebook tags inside of GTM that looks like this:

Step 2: Update in GTM

Next, you'll need to do the following:

  1. Update your Facebook Pixel ID variable. You do this inside of Google Tag Manager > Variables > and you'll see something like this below. Click into here and update the setting with your own Pixel ID.
    Screen Shot 2019-06-14 at 7.57.54 AM
  2. Unpause the Facebook tags in GTM (if they are paused). If they are paused then they will look like this below with the yellow pause icon. Simply click into each one and click "Unpause" in the top right corner of your page.
    Screen Shot 2019-06-14 at 7.58.57 AM

Step 3: Match Your Product IDs

In order to run dynamic product remarketing advertising, then you have to send the same product content IDs from your pixel to match your product content IDs that you upload to Facebook with your product feed. 

If you already have your product catalog connected to Facebook then you can go to Facebook Business Center > Catalogs > click on your Catalog and a product of yours. You should see something like this that contains Content ID and Item Group ID. 

It is most likely that your product ID is either:

  • Variant SKU
  • Product ID
  • Variant ID

Here's an example from Facebook:

Image 2020-02-25 at 9.52.28 PM

If your Content ID was my (1) Shopify product ID or (2) Variant ID, not SKU, then go to GTM and update the following tags and variables:


  1. Product View
  2. Add to Cart

FB tags

Here is how to switch things out for the Product View tag.

For Product ID


Note: Be sure to confirm the 'Content_Type' if it's using 'product' or 'product_group' Then hit Save.

variant ID Feed



  1. Initiate Checkout
  2. Purchase/Thank you

FB checkout variable

Here is how to switch things out for the Initiate Checkout variable which you can replicate to the Purchase/Thank you page variable.

fb variable change

Note: Here's the correct matching variable

  1. Variant SKU – .Id 
  2. Product ID – .productId
  3. Variant ID – .variantId

Once you're ready to test & publish then be sure you are using the Facebook Pixel Helper Chrome Extension to validate the tag data is correct. 

You should see a green checkmark for the various Facebook events (view product pages, add to cart, initiate checkout if you are on Shopify Plus, and transactions):




Note: Purchase and Initiate Checkout

The Facebook Transaction reporting has been improved with new callouts:

  1. The contents group that contains line item data (ID, Product Name, Product Category, Item Price and Quantity)
  2. Manual advanced matching which contains a hashed version of fn/ln etc., of purchaser

New FB Transaction Reporting

Step 4: Remove your Shopify FB Pixel

Once you publish your GTM container then go to your Admin > Online store > Preferences > Facebook Pixel and remove this setting below.

Once you've completed this step then that's it - you are live with Facebook tracking via GTM!

Step 5: Monitor your FB biz Account for Errors

Note: If you're seeing duplicate tracking, probably it's coming from another Facebook Marketing App. We suggest removing FB chat as well as FB marketing apps from Shopify.

That's it!


Back to Top 🔝