beprofit logo
ProductExpand more icon
profit calc image
Profit Simulators
Tweak your numbers to lift profits up
action card image

Demo Store

Want to see our
dashboard in action?
ResourcesExpand more icon
CompanyExpand more icon
Want to see our dashboard in action?
you can try it here with theDemo Store!

How to Add Facebook Pixel to Shopify

Brody Hall
By Brody Hall
Joel Taylor
Edited by Joel Taylor

Published July 1, 2022.

Woman packing a box for a clothing business

Facebook Pixel tracks conversions and measures the effectiveness of advertising campaigns. Essentially, when a Facebook user visits a website and takes an action that has been predetermined as a conversion (such as signing up for your mailing list or making a purchase), Facebook will record this conversion and credit it back to an advertising campaign.

How Does Facebook Pixel Work?

Facebook Pixel is a snippet that is placed with a website’s HTML code to track conversions and site traffic originating from the social media platform. When someone visits this website before clicking on an ad or Facebook post, Pixel will send information back to the platform about that visit. This data helps to measure the effectiveness of Facebook advertising campaigns, helps avoid some errors while calculating profits, and grants site owners with insights into how their ads are performing.

Facebook Pixel coding can be found within the platform’s Events Manager. Simply create the code, copy it, and paste it into your website’s backend. To do this, follow these steps:

  1. Go to Facebook’s Events Manager
  2. Click the "+" button
  3. Click “Connect data sources"
  4. Click “Web
  5. Select “Meta Pixel” and click “Connect
  6. Name your Pixel under the “Pixel name” option
  7. Enter your Shopify store’s URL to see setup options
  8. When ready, click “Continue” to confirm your actions

Once you’ve created your Meta Pixel, it’s time to insert the code into your website. To do so:

  1. Head back to the Events Manager
  2. Select the Pixel you’ve just created
  3. Click “Continue Pixel setup
  4. Select “Install code manually
  5. Now, for the important part, copy the Pixel base code
  6. Next, head over to your website’s CMS—in your case, Shopify
  7. Enter the admin panel, then navigate to “Online Store” > “Themes
  8. Select your current theme and press the “Customization” button
  9. Locate your website’s header or find the header template
  10. Paste the Pixel base code at the bottom of the header section, just before the closing heading tag - </head>
  11. Click “Continue
  12. This next part is optional. Toggle on the “Automatic advanced matching” if you’d like and click “Continue
  13. That’s it; your Facebook Pixel code is now added to your Shopify store

Beyond Facebook ads, there are other potent methods of increasing sales in your Shopify store. To learn more, see how a loyalty program for Shopify can help.

Why Add Facebook Pixel to Shopify Stores?

By integrating Pixel into a site’s coding, website owners can see which of their ads are driving traffic and sales and then optimize their campaigns accordingly. Pixel data can also be used to create custom audiences for targeted ads. Additionally, Facebook Pixel provides insights into how people interact with a store, potentially showcasing areas of improvement, including design and usability.

Another super powerful way to advertise your Shopify store is through the use of IG ads. Learn everything you need to know about Shopify Instagram ads here.

How to Add Facebook Pixel to Shopify

Here’s a quick step-by-step guide on how to add Facebook Pixel to a Shopify store:

  1. Create a new Pixel through Facebook’s Ads Manager. To do so, within a Facebook channel, from the set-up box, click “Create new
  2. From Shopify’s admin page, click “Sales channels” > “Facebook
  3. Select “Settings” > “Data sharing settings
  4. From the “Customer data-sharing” section, click “Enable data-sharing
  5. In the “Choose data-sharing level” section, choose between “Standard”, “Enhanced”, or “Maximum
  6. Select your Pixel from the list
  7. Click “Confirm

Want to know more about how to convert more Shopify sales with the right apps? Learn more in our Shopify sales funnel apps, Shopify profit calculator apps, and best Shopify apps posts.

How to Run Dynamic Ads on Facebook With Shopify

Once Facebook Pixel is set up and ready within your online store and synced with your Shopify products to Facebook, it’s time to run some Facebook dynamic ads. To do this, follow these steps:

  1. From Shopify’s Admin Page, Head to “Marketing
  2. From here, click “Create activity
  3. Select “Facebook dynamic retargeting ad
  4. Name the dynamic retargeting ad
  5. Set the ad campaign’s budget
  6. Set the campaign’s start date and end date
  7. Click “Publish activity

To ensure you’re getting the most out of your Facebook campaigns, see our Facebook campaign budget optimization post. And if you’re new to Shopify, learn how to start a Shopify store here.