Shopify FAQs

How To Create and Add Facebook Pixel To Shopify + 6 Pro Tips [2022]

Published:

March 3, 2024

In this competitive digital environment, every business wants to increase its customer base and maximize sales. To acquire more and more customers quickly and effectively, businesses try running Facebook ads to reach a large group of people. Many of these businesses run Facebook ads without having Facebook pixel code installed on their Shopify store.

This keeps these businesses away from fully tapping into the true potential of the Facebook audience and also keeps their ROAS low. Most importantly, they lose access to the data on the actions and behavior of their website visitors.

If you are also running your Facebook ads without Facebook pixel on your Shopify site, then you're losing sales and revenues that could have been yours.

The Facebook pixel helps you boost your sales by tracking Facebook ad conversions, optimizing ads, building targeted audiences for your future ads, and remarketing your website visitors. All this is done with the help of a piece of tracking code that you add to your Shopify store.

So, to help you create and add a Facebook Pixel (now known as Meta Pixel) to your Shopify store, we created this “How to Create and Add Facebook Pixel To Shopify” step-by-step guide for 2022. Without any further ado, let's get started with the basics first.👇

What is a Facebook Pixel (a.k.a. Meta Pixel)?

The Facebook Pixel, now known as Meta Pixel, is a piece of code that you paste into your Shopify store's header section. This code helps Facebook track your website visitors and how they interact with the content on your website.

These tracked interactions are called standard events, and they help you build better-targeted audiences so that you can be sure that your Facebook ads are shown to the right people. There are 17 standard pixel events, for which you can simply copy and paste the Facebook event code. Some of these are:

  • Purchase - A client buys something from your online store.
  • Lead - A person signs up for a free trial, submits their email, etc.
  • Complete registration - Someone submitted their registration form in exchange for the service provided by your business.
  • Add payment info - Someone added their payment information during a checkout process.
  • Add to cart - A person added a product to the cart on your Shopify store.
  • Add to wishlist - A person adds an item to the wishlist.
  • Initiate Checkout - A person started the checkout process.
  • And many more! You can find info about all the events on Meta Business

How Does the Facebook Pixel Work?

How Does the Facebook Pixel Work?

The Facebook pixel works by placing and activating cookies to track users while they interact with your business on Facebook and Instagram. Let's take a hypothetical situation where a user clicks on your link ad and ends up on your website buying one of your products. The Facebook pixel will get triggered with this and report this action.

Now you'll know when a customer takes action after watching your Facebook and Instagram advertisements, and you can effectively target this specific client by utilizing Custom Audience.

As more and more conversions start happening across your Shopify store, Facebook will automatically get better at displaying your ads to the right audience who are likely to engage. Marketers call it conversion optimization

Pixel is literary monitoring every action on your site, e.g. cart abandons, ad clicks and views, and a lot more! Since all this crucial data is recorded, you can seamlessly retarget these shoppers and remind them to come back and proceed with their purchases. 

The Facebook Pixel and iOS 14.5 Update

As Apple has announced changes in the third tracking in iOS 14.5, some Facebook pixel functionalities will get disabled for the updated Apple devices. Before you start panicking, you should know that only 14.7% of smartphone Facebook users access their social media through iOS devices.

Changes made in the iOS 14.5 update will affect all advertisers. One of the major changes in this update is that advertisers can now only set up a maximum of 8 standard events and custom conversions

Advertisers will now have to change the way they used to utilize Facebook pixel. 

How To Create a Facebook Pixel For Your Shopify Store?

Before we start, you need to fulfill these 2 requirements:

  • You need to have a Shopify or any other website.
  • Permission to update your website code.

If you have both, then let's create a Facebook pixel for your Shopify store.

  1. Go to your Facebook Events Manager.
  2. On your left-hand menu, click on Connect Data Sources.

Creating a Facebook Pixel For Your Shopify Store

  1. Select Web and then click Connect to continue.

Creating a Facebook Pixel For Your Shopify Store

  1. Enter a name for your Pixel and then click Create Pixel.

Creating a Facebook Pixel For Your Shopify Store

While choosing the name of your pixel, keep in mind that the Event Manager only gives one pixel for each ad account. So, you should submit the name that represents your business rather than a certain campaign.

  1. Now enter your website URL and select the Tick button. Now it will take a couple of seconds to verify and then display a Green tick along with the Next button. Click Next.

Creating a Facebook Pixel For Your Shopify Store

  1. In the next pop-up, click Meta pixel only and click Next.

Creating a Facebook Pixel For Your Shopify Store

That's it! You have created your Facebook, a.k.a. Meta Pixel.

Where to Find Your Facebook Pixel?

After you have created your Facebook pixel, to find it, simply follow these steps:

  • Go to your Events Manager.
  • Choose your Business Account.
  • Beneath Data sources, select your Facebook pixel ID and there you have it!

How to Connect Facebook Pixel to Shopify? Steps Explained!

After successfully creating your Facebook pixel, it's time to connect or link the Facebook pixel to your Shopify store.

  • Go to the Facebook Events Manager.
  • Choose your Pixel and click “Continue Pixel Setup”.

Add Facebook Pixel to Shopify

Now here, you have 3 possible ways how you can install Facebook Pixel on your Shopify store. These are:

  1. Manually install Facebook pixel code.
  2. Using a Shopify Partner integration.
  3. Send Instructions to your website developer.

Let's begin going through them one by one.

1. Manually Install the Facebook Pixel to Shopify

To manually add the Facebook pixel to Shopify, follow these steps:

  1. Select “Install Code Manually”.
  2. Copy the pixel base code.
  3. Find the header of your Shopify website, or find the header template in your CMS or web platform.
  4. Find the <head> </head/> in your code.  
  5. Paste the pixel base code at the bottom of the header section, just above the closing head tag (</head>).
  6. Select “Continue” and that's it!

2. Send Instructions to Your Website Developer

If your developer is taking care of your Shopify store, you can ask them to install Facebook Pixel for you. Here's how you do it:

  1. From the 3 methods, Select “Email Instructions”.
  2. Enter your recipient's email address.
  3. Click Send and it's done.

3. Using a Shopify Partner Integration

  1. Click “Check for Partner” and select Shopify.

This will take you to your Shopify store. To add the Facebook pixel to your Shopify store, you need to ensure that your Shopify Account is connected with Facebook. Follow this Shopify guide on how to connect Shopify to Facebook, or watch this Pixel tutorial on YouTube.

After it's done, go back to Facebook to proceed with the setup. Checkmark the box alongside “I've completed the setup on Shopify” and click Next.

 

Connect Facebook Pixel to Shopify

How To Check If Facebook Pixel is Working Properly or not?

Creating and installing pixel isn't just enough, you also need to verify that your pixel is properly working with your Shopify store. For this, after clicking the Next button in the Partner integration step, enter your domain address and click Send Test Traffic. This will take you to your Shopify website. Now all you need to do is head back to Facebook and your status should now be changed to Active. 

Verifying Facebook Pixel is Working Correctly

Click Next. Now you will see a confirmation window, here you can do Test Events in the Event Manager, create a new ad or simply go to Facebook Analytics. It's recommended to Test Events in Event Manager, as it will help you to check whether your pixel is picking up all the different events that you're firing on your store or not. 

Try Facebook Pixel Helper Chrome Extension

The other method through which you can check whether your Facebook pixel is working or not is Facebook Pixel Helper Chrome extension. Use this link to download and install the extension. Facebook Pixel Helper enables you to troubleshoot errors and enhance the pixel performance. This extension is available on Microsoft Edge as well. 

Pixel Events for Shopify

There are 2 types of events:

  1. Standard events
  2. Custom events

Standard events have already been discussed above.

Custom Events

Custom events let you leverage actions that aren't included in the standard events. You can add a unique custom event name that represents the action you wanted and build custom audiences. To use custom events for optimization, map them to a custom conversion. Later, you can select the standard events which the custom conversion should be optimized for. 

Custom conversions

Custom conversions let you create rules for URLs or events. These rules enable you to track particular actions of customers. You can filter and track desired events and run highly focused advertisements to motivate clients to complete their purchases. 

How to Change or Remove Facebook Pixel from Your Shopify Store?

If you already have an existing pixel installed on your store, and you want to add a new one, you should first remove or delete the old pixel to avoid duplication. You can remove old Pixel from your Shopify store through Online Store Preferences or from theme.liquid file. 

Removing the old Facebook Pixel through Preferences

  1. From your Shopify admin, select “Online Store” and then go to “Preferences”.
  2. In the Facebook Pixel section, tap Change if you want to change it.
  3. If you want to delete it, simply remove the Facebook Pixel ID and then click Save.

Removing Pixel code from your theme.liquid file

  1. From your Shopify admin, click Online Store > Themes.
  2. From your Current theme section, click Actions > Edit code.
  3. Click theme.liquid file to open it in the code editor.
  4. Search for the Facebook pixel code between the headers, <head> and </head> tags.
  5. Delete the code and select Save.

Tips to Boost Your Facebook Pixel Conversions

6 Effective Tips to Boost Your Facebook Pixel Conversions

Running Facebook Ads without proper optimization won't bring you many conversions. You need to properly utilize the Facebook pixel to effectively target your actual audience on all fronts. The best part about using Facebook pixel is that you know for sure that your Facebook ads are backed by authentic website data, not on some gut feelings.

So to help you make the most from your Ads, here are the 6 most effective tips to help you maximize your Facebook pixel conversions.

1. Build Custom Audiences to Run Enhanced Targeted Ads

Facebook lets you create custom audiences and display ads to the people who have already visited your store and shown some interest. With this, you encourage your visitors to purchase more items from your store and boost your conversion rates and sales.

Using Meta pixel data to create custom audiences allows you to display your ads to the different audience groups based on the items they're interested in. With this personalization, you increase your chances of selling and improving your ad conversion rates and ROI.

By creating custom audiences, you can run retargeting ads to target cart abandoners and Shopify store visitors.

2. Utilize Facebook Conversion Tracking

The Facebook pixel enables you to analyze how people interact with your website after seeing your Facebook ads. It's called conversion tracking. You can efficiently track these visitors across their devices. 

Using this data, you can refine your ad strategy and enhance your ad ROI. After the release of iOS 14.5, this Facebook pixel function is affected. However, Facebook will make sure advertisers still get some conversion tracking data using its Aggregated Event Measurement.

You need to verify your website domain to continue getting the best conversion tracking data. Since iOS 14.5 won't let tracking across several domains, you need to adhere to one domain for conversion tracking. You may find tracked conversions in the Facebook Ads Manager. 

3. Create Lookalike Audiences 

Creating lookalike audiences using Meta pixel data helps you to expand your user base and drive more conversions. Using this pixel data, you can build a group of lookalike audiences of Facebook users with similar interests, likes, and demographics of people who are already interacting with your store. 

The iOS 14.5 update will affect the input data for the lookalike audiences because the tracked audiences on which the lookalike group is based will diminish. As the number of iOS users is in minority, the lookalike functions will still offer a lot of informative data. 

4. Facebook Retargeting using Dynamic Product Ads

It's not necessary that every store visitor will make a purchase, but you can surely record their activities and utilize this data to retarget them using dynamic product ads. Facebook pixel can help you with this. It can capture the activities of the visitors who viewed a product and even added it to their shopping cart but did not make the purchase.

Using these ads, you can encourage these shoppers to complete their purchases. The best part is that you get to run these product ads automatically without putting in a lot of manual work. 

5. Optimize Ads for Conversions

Facebook collects data on who purchases from your store and their total spending, so it can optimize your ads based on the value. This will automatically display your ads to the people who are most likely to engage and make high-value purchases.

6. Compare Ad Clicks to Traffic Data

It's not necessary that an ad click will always turn to a landing page view. Website speed issues can affect visitors' experience and force them to leave. Several profound advertisers compare the difference between ad clicks and views to spot any loading speed issues with the target site.

They use the difference between website landing page views with outbound clicks to get a better idea of how many clicks are actually turning into real traffic. Successful Facebook ads get an 85%+ conversion rate of click to real traffic.

If your conversion rate falls below 85%,  you can use these Shopify speed tips to increase your store speeds.

Frequently Asked Questions (FAQs)

Why is my Facebook Pixel not working on Shopify?

If you have a Facebook pixel installed on your Shopify store and your tracking is not working, there can be 2 major causes for it:

  • Your browser has an ad-blocker that is stopping the tracking codes from firing. If so, please disable it and try checking if Fb tracking is working.
  • Your Customer privacy setting in Shopify may be restricting your Facebook channel from loading. 

Is Installing Facebook Pixel on Shopify worth it?

Facebook pixel data assists you in displaying your ads to the right audience who are most likely to engage with your brand and take the desired action. Your ad conversions and ROI are significantly improved. 

You should install Facebook pixel even if you haven't started using Facebook or Instagram ads. Installing it early will enable you to collect plenty of data so that when you create your first Facebook ad, you have all the data you need. 

Does Facebook pixel work with Instagram?

Yes, it does. It is on the same advertising platform, i.e. Facebook. When you set up your Facebook pixel, you get an option in your ads manager to select where you want to run your ads.

Where is the Facebook pixel on Shopify?

From your Shopify admin page, on the left pane under Sales channels, click Online Store > Preferences. Scroll down and navigate to the section “Facebook Pixel”, here you can set up your pixel.

How to Add Facebook Pixel To Shopify Thank You Page?

Advertisers use pixel to track the actual purchases made on the Shopify Thank You Page. To add the pixel to the Shopify thank you page, you can either set up your Facebook tracking via the Facebook channel (check here) or add a purchase event through Settings > Checkout. Here, place your code inside the Additional scripts section.

Amazing Facebook Stats For Marketers

  • The average organic reach of a Facebook post was 5.2% in 2020, reduced from 5.5% and 7.7% in 2019, and 2018.
  • The average Facebook ad cost-per-click was USD 0.38 in 2020 but jumped to USD 0.43 in 2021. Generally, Fb ad costs tend to be lower in the first quarter of each year but peak while approaching the last quarter or holiday season.
  • Facebook ads reached 34.1% of the entire global population over age 13.
  • Facebook ads reached 63.7% of all Americans over age 13.
  • The Facebook Marketplace reaches 562 million people.
  • In the 2020s Q4, Facebook generated $27.19 billion from ad revenues.
  • 74% of the CTA ‘call-to-action’ buttons say “Shop Now”.

Wrapping Up!

By creating and adding a Facebook pixel to your Shopify store, you ensure the success of your Facebook ads. You can better reach your targeted audience, expand your customer base, drive conversions, and much more. Now with our guide on “how to create and add Facebook pixel to Shopify” the entire setup process has been simplified. I have also added all the necessary information which you might need during your installation or testing. 

Now you're good to go with your Facebook ads.

If you want to contribute to this blog post or request any changes, please mail us at marketing@logbase.io

For more exciting and informative blogs on Shopify, subscribe to our newsletter 📧. Happy Growing!🙂

People also read:

No items found.
Table of contents