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
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:
- 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.
- 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.
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:
- Product View
- Add to Cart
Here is how to switch things out for the Product View tag which you can replicate to the Add to Cart tag.
Note: If you are using the 'Variant ID', you need to include and change the Content-Type to 'product_group' for all tags (Product View, Add to Cart, Initiate Checkout, and Purchase), Then hit Save.
- Initiate Checkout
- Purchase/Thank you
Here is how to switch things out for the Initiate Checkout variable which you can replicate to the Purchase/Thank you page variable.
Note: Here's the correct matching variable
- Variant SKU – .Id
- Product ID – .productId
- 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:
- The contents group that contains line item data (ID, Product Name, Product Category, Item Price and Quantity)
- Manual advanced matching which contains a hashed version of fn/ln etc., of purchaser
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