How to Add the Facebook Pixel to Shopify (+Tips for a Better ROI)

Facebook Ads is one of the best ways to market your goods.

But many eCommerce stores aren’t making as much money as they could be.  Why? Because they’re not using the Facebook pixel properly.

The Facebook pixel tracks visitor behavior and interactions on your Shopify store. It provides data on engagement that you can use to optimize your ads.

So, if you’re ready to learn how to add the Facebook Pixel to Shopify, keep reading. We’ll show you how to set up your pixel, and optimize it for best results.

Sounds good? Let’s go!

What is the Facebook Pixel (Now called ‘Meta Pixel)?

Firstly, what exactly does Facebook Pixel on Shopify do?  

The Facebook Pixel is a tiny piece of code that monitors website or “pixel” events on your store. 

A website event is a specific action that users perform on your website. 

For example, an event is an action like clicking on a product for more information, visiting a page, or making a purchase. 

The Facebook Pixel monitors each of these events to give you data on the number of times they happen and with which type of customers.

With this information, Facebook can give you better results from your advertising.  

For example, suppose Facebook shows your ads to 10,000 people and 200 people click on them. With the pixel, Facebook can learn more about those who are interested in your products by getting data from their visit to your store. 

Subsequently, Facebook can show your ads to more people that are similar to those browsed your store.

Adding the Facebook Pixel to your eCom store is one of the best ways to boost your sales on Shopify. But how do you start? Let’s keep going to learn more.

How to Add the Facebook Pixel to Shopify

The first step is to check that you have a Facebook ad account. If you haven’t, you need to set one up. If you don’t have an ad account set-up, follow these steps as outlined by Facebook.

Once you’ve configured your ad account, you can set up a pixel as follows:

1. Create your facebook pixel

  • Go to your Facebook account’s Event Manager.
  • Select Connect a New Data Source. 
  • Then select Web. 
  • Go to Name Your Pixel (you’ll find it in the Create Pixel section) and pick a name for your pixel. 
  • Then click on Create Pixel when you’re done.
how to install facebook pixel on Shopify
source

2. How to add the Facebook pixel to Shopify

With your pixel created, you need to add the pixel to your website. Navigate to the Facebook ‘Check for Partner’ section.

  • Click Use Partner Integration
  • Head to the Choose a Partner menu and select Shopify
Source
  • You now need to go to the Shopify admin screen and select Sales Channels. 
  • Go to Online Store and click Preferences
  • Look for the Facebook Pixel section and select that:
how to add facebook pixel to shopify
  • Click Set up Facebook. You’ll then go to the Facebook app, from which you need to select Add App. 
  • Go to Settings and click Apps and Sales Channels. You should be able to see your Facebook Pixel—select it.
  • Then click Open Sales Channels. 
  • Go to Settings and select Data Sharing Settings. 
  • Then, look for the Customer Data-Sharing section and select Enable Data-Sharing.

You can modify your data sharing level with three settings available: Standard, Enhanced, or Maximum. Once done, you’re good to go. Just click Confirm, and you’re all set. 

3. How to manually add the Facebook Pixel to Shopify

If you want to go down the manual route of getting Facebook Pixel on Shopify, this is what you do. 

  • Go to Facebook Event Manager and copy the pixel code (a snippet of JavaScript you can grab by clicking Copy Code).
  • Then go to Shopify Admin and select Themes, then Edit Code. 
  • Go to the theme’s header code and paste your copied code between the <head> and </head> tags. Click Save. 

You can also use an alternative method:

  • Go to your Facebook Ads Manager and copy your pixel ID number. 
  • Go to Shopify, select Online Store, and hit Preferences.
  • Look for the Facebook Pixel tab and paste that ID number in. 

That’s it. It’s somewhat more straightforward to do it manually. But it relies on you being a little more comfortable using codes than the more automated route. 

All methods of adding the Facebook Pixel to Shopify work equally well, so choose whichever method seems most intuitive.

How to Use the Facebook Pixel For Better Results

Now that you've added your Facebook Pixel to Shopify, it's time to learn how you can use it for better advertising.

1. Monitor Shopify events through Facebook Pixel

There are five basic events that Facebook Pixel monitors. These are PageView, ViewContent, AddToCart, InitiateCheckout, and Purchase. Facebook Pixel delivers data on all these so that you can build up a picture of how people are moving around your site. 

You can then combine this data with your order management software to help you track your customers' activity and purchases alongside your stock levels. This can help you spot any increase in orders or activity so that you can place extra orders if needed. 

2. Build custom audiences for precise marketing

If somebody visits your site as a result of clicking on a Facebook ad, they may buy something from you, or they may not. Either way, they’ve shown they’re generally interested in your area of industry. 

You can promote your Shopify site by creating a precise marketing field. Do this by building what’s known as a custom audience from people coming to your site or who trigger a specific event while there. Here’s how you do it. 

  • Go to Facebook Ads Manager and click Custom Audiences. 
  • Then go to Create Audience and Website Traffic. 
  • Select people who fall into the listed categories, then select your pixel from the menu.
  • Choose the number of days you would like people to remain in your custom audience following their visit to your site. 
  • Then, you need to name your audience and click Create Audience. 

By clicking Add a Parameter, you can fine-tune your custom audience to include those who trigger specific events. 

You now have a custom audience that you can send marketing to with better results than you’d get with a random set of customers. 

3. Set-up Retargeting Ads with Custom Audiences

Retargeting ads are typically one of the highest ROI ad campaigns you can run.

You can implement various retargeting techniques through Facebook Pixel on Shopify to propel people down the conversion funnel. We’ll look at two of them. 

Sometimes, a customer will visit a site and fully intend to purchase a product or products. They may click on the More Information button, they may put them in their shopping cart, and they may have started the checkout process. But for whatever reason, they may not see the purchase through to completion. 

It could be that they got distracted. Or it could be that their manager walked into the office. In any case, it can be helpful to the customer to get a reminder that they have these items still sitting in their cart. Would they like to go through with the purchase now that they have a minute?

That this is beneficial to the business goes without saying. But we shouldn't overlook its assistive value to a busy consumer trying to cope with various pressures. 

To create this kind of ad, create a custom audience of website visitors for the last 14 days. Then run an ad with a promotion to them offering a discount if they return and complete their purchase today.

Another retargeting technique is to set your Facebook Pixel to fire when an event takes place. This could be when a site visitor adds your item to their wishlist or views a video about your product, for example. You can use that data to retarget that customer with special offers or information relevant to that product.

Even better than this, you can track a customer’s engagement with a topic or product across their different devices. This way, your picture of what they’re interested in throughout the day becomes richer and more detailed.

4. Find more customers with lookalike audiences

Once you have a custom audience for your marketing campaigns, you don’t need to stop there. You can increase your potential market by constructing lookalike audiences. These are groups of customers who mirror your custom audience. They will share certain pertinent characteristics and user behaviors. 

In this way, you can boost your marketing reach, but not just by flinging out more and more ads in the hope they’ll get noticed. Constructing a fertile audience and then asking Facebook to come up with much more of the same will give you a great marketing operation. It will broaden your scope while targeting those most likely to respond. 

You can also create custom audiences directly from website events. So, let’s suppose you have 2,000 customers tracked on your Facebook Pixel. You can use these purchase events to create a massive audience of other potential customers who are very similar to your customers.

We recommend creating 1%, 5% and 10% lookalike audiences and running ads to them to see which performs best. Remember, with Facebook ads, testing is always critical for best results.

5. Understnd your ROI via Facebook Pixel Insights

By getting a clear picture of the conversions that a particular ad secures, you’ll be in a great place. You'll be able to establish some firm ROI figures for your marketing. You can go general or more detailed, such as setting your parameters to get insights into spend per click for a given ad. 

You can then use this marketing ROI data in your subsequent advertising campaigns. If you’re trying to decide if a marketing campaign justifies the amount they’re likely to cost you, you can get a steer from past performances. 

You can also combine this data with data from other sources such as your accounts payable software or your CRM software to give you a more holistic view of your spending and marketing efforts. This can help give you a more accurate picture of your marketing campaign and help you better plan your marketing budgets in the future. 

You can also use these kinds of deeper insights to persuade other parties. The combined data can be used to create a detailed report that you can present to a boss, a client, or whoever it is you need to sway to get the marketing budget signed off. 

How to Troubleshoot Common Facebook Pixel Issues

There are plenty of problems that tend to crop up, but the good news is that they’re usually solvable. 

1. Use the Facebook Pixel Helper

One of the biggest helps is to download the Facebook Pixel Helper (the Chrome version is here). 

  • Install, then go to your Shopify site’s product page. 
  • Click on the Facebook Pixel Helper icon, and you should then see ViewContent appear on your product page. This is because the ViewContent event has been triggered. 
  • Same if you then go to AddToCart. This will then fire the AddToCart pixel event. 

Keep going until you have the five basic events we mentioned above covered. You should see all of the steps appearing as above when you go through them. This will show you that Facebook Pixel on Shopify is monitoring events correctly. 

2. Code troubleshooting

When you set up your pixel in the first place, double-check that you’ve used the correct pixel base code.

Don’t forget that the event code needs to include an event name. Otherwise, you’ll get a Missing Event Name error message. 

You need to make sure that you spell standard events right. They’re case-sensitive, so don't write ViewContent as viewcontent, or it’ll be treated as a custom event without definition. If an event is similar but not identical to a standard event, you’ll get an Event Name Mismatch error message. 

3. Misleading event data

Sometimes, a pixel will misreport the number of events. This may be because more than one action ties to, for instance, the Purchase event. It’s obviously important for data accuracy that an event is only recorded when one particular action takes place. Otherwise, you may have an over-reporting of events. 

Sometimes, this kind of over-reporting can take place as a result of a mix of automation and website source code, producing event duplication. You can turn off any automatic events that are being triggered and skewing the data. 

4. Data violations

You may get error messages telling you that certain kinds of data collection violate Meta’s terms and policies. The process then halts. This data can include health, financial, and other personal information that Meta forbids you to process. To solve this problem, you need to review exactly what data you collect. Then, remove any problematic instances. 

Add the Facebook Pixel to Shopify Today!

You may have the best Shopify site in the business. But it won’t succeed unless people know about it and are persuaded to visit it. This is where Facebook Pixel on Shopify can be a game changer. Using the above simple steps, you can keep an accurate eye on what aspects of your marketing deliver the best results. This will then inform your future campaigns. 

The end result will be an expanded customer base, which is a gigantic result from a little pixel.

Facebook Pixel Shopify FAQ

Let's quickly cover some of the most commonly asked questions around installing the Facebook Pixel on Shopify.

Can I add Facebook pixel to Shopify?

Yes, you can easily add the Facebook pixel to Shopify by navigating to your Shopify admin, selecting "Online Store," and then adding the pixel code to the "Facebook Pixel" section.

What does the pixel do on Shopify?

The Facebook pixel on Shopify helps track and measure the effectiveness of your Facebook ads. It provides valuable insights into user behavior, allowing you to optimize your advertising strategy and retarget visitors for better conversion rates.

Where can I find my Facebook pixel on Shopify?

Locate your Facebook pixel on Shopify by accessing your Shopify admin, navigating to "Online Store," selecting "Preferences," and then finding the "Facebook Pixel" section. Copy and paste your Facebook pixel ID or integrate it directly with your Facebook Business Manager for seamless tracking of user interactions on your Shopify store.

Why is my Facebook pixel not connecting to Shopify?

There could be various reasons why your Facebook pixel is not connecting to Shopify. Common issues include incorrect installation of the pixel code, discrepancies in the account settings, or issues with your browser. Double-check the pixel installation, ensure the account permissions are correct, and try using a different browser if you encounter difficulties.

Start your Free Trial

ReConvert empowers you to instantly boost revenue by 15% with one-click upsells, customized thank you pages, and more.
Find it on the
Shopify App Store