How to Add the Facebook Pixel to Shopify (For Beginners)

Home » Marketing » Social Media Marketing » How to Add the Facebook Pixel to Shopify (For Beginners)

It’s impossible to run a successful ecommerce business without the help of Facebook ads. They’re an essential part of your online marketing strategy. But if you don’t have the Facebook pixel, you’ll miss out on vital information to help you make informed decisions when creating and optimizing your ad campaigns.

The Facebook pixel is excellent. You’ll get better performance, more conversions, and a more significant ROI from your ads.

That’s why we created this step-by-step guide for you to help you how to add the Facebook pixel to Shopify (For Beginners). So, make yourself a nice cup of tea, read the steps below, and by the end of this article, you’ll have added a brand new Facebook pixel code to your site.

Table of Contents

What is the Facebook Pixel?

The Facebook pixel is a tracking code that gets embedded into the HTML of a website. When a user clicks on a link from Facebook, the pixel can collect information about what they did on the site and what they clicked on within site itself.

Facebook uses this information to measure how many people visit the site, where they are coming from, and how they engage with it.

About Facebook Pixel importance?

Facebook is one of the most common ways companies track online traffic because it’s simple, effective, and relatively inexpensive. Essentially, you place a pixel on your website, then use Facebook to tell advertisers how many people clicked through to the page.

While this is an easy solution, the downside is that it only tells you about visits on Facebook, which means it doesn’t tell you which channels were used to promote your website and whether those channels are working.

But with the Facebook pixel, you’ll always know if the campaign is working and what you need to fix.

Here are some of the actions you can track.

  • Add to cart
  • Add to wishlist
  • Search (e.g., there are searches in the website search bar)
  • Add payment info
  • Purchase

and many more

What is the method to create a Facebook pixel for a Shopify store?

Make sure if you fulfill these two requirements or not: 

  • Make sure you have a website or ecommerce store like Shopify Store.
  • You can update your website’s code.

Excellent, if Yes! Let’s go ahead and create a Facebook pixel for your Shopify store.

  1. First, locate where is your Events Manager. To find this, you need to log in with your Facebook id. In the left top corner, where your id name exists, there is Menu you will find “See More.”
  2. You will find “Ads Manager” and “Meta Business Suit” in those options.
  3. You can find Event Manager on both pages. In Meta Business Suit, Where you see three lines, it can find in “All Tools” in Menu.
  4. In “Ads Manager,” its location is again in three lines “All Tools.” Click here; you will find Event Manager.
  5. Go to your Events Manager. Click on the green + sign of Connect Data Sources.
  6. Connect Web, select Facebook Pixel, and click Connect.
  7. In this window, you’ll enter a name for your pixel.
  8. If you have several Shopify stores, assign them an indicative name.
  9. You can also enter your website URL if you want to promote it.

Since Shopify is one of Facebook’s integration partners, it has an easy setup method.

Here is all about creating Facebook pixels. Congratulations if you completed these steps.

Where can I find my Facebook pixel?

Once you have created a Facebook pixel, you can find it here in a few clicks.

  1. Open the page of Events Manager as described above.
  2. Click on your id name and Select your “Business Account.”
  3. Click on Data Sources, and select your Facebook pixel ID.

How to add a Facebook pixel to your Shopify store in 3 different ways

You have three ways to set up the Facebook pixel on your Shopify store:

  1. Use your Shopify Store integration;
  2. Add the Facebook pixel code manually by entering the code on the website;
  3. Send code to your web developer to do it.

We are going to go step-by-step through them.

1. Add the Facebook pixel by Shopify integration.

It’s the easiest way for Shopify store owners to set up a Facebook pixel.

  1. Go to your “Shopify admin,” In the Sales channel section, you will see Facebook, then click “Facebook.”
  2. Click “Settings” and click “Data sharing settings.”
  3. Go to the “Customer data-sharing” option and click the “Enable data-sharing.”
  4. Then, in the “Choose data-sharing level” option, select one of the options Standard, Enhanced, or Maximum.
  5. Select your Facebook pixel from the list. 
  6. Click Confirm, and you’re done.

2. How to Add the Facebook pixel to Shopify manually.

If you’re familiar with HTML, then you should be able to put the Facebook pixel code on your site.

  1. Open your Events Manager.
  2. You can choose which pixel you want to add.
  3. Click “Continue Pixel Setup.”
  4. Choose “Install code manually.”
  5. Copy the Facebook pixel code.
  6. Find the header of your Shopify store:
  7. Open “Online Store” and Click “Themes.”
  8. Go to “Actions” with Customize green option.
  9. Find “Edit Code” There
  10. Look for <head> </head> in your code or
  11. You can find the template on your web platform.
  12. Paste the Facebook pixel code after <head>, and before </head>, so it would be in the middle of the header code:

And You have done all.

3. Send code to a developer to install the Facebook pixel code to your Shopify store.

If you have a web developer who works for you, you can easily ask them to install the Facebook pixel. Here’s how:

  1. Go to Events Manager.
  2. Choose the pixel you want to add.
  3. Click “Continue Pixel Setup.”
  4. Choose “Email Instructions.”
  5. Enter your web developer’s email address.
  6. Click “Send.”

The Facebook pixel helper is an excellent tool that lets you see if your Facebook pixel is working. You can find it here.

Facebook pixel helper is the best tool for troubleshooting errors and working on your pixel’s performance. You can download Facebook pixel helper Google Chrome extension for this purpose.

You may also read: Should You Announce Engagement On Facebook

Impacts Of Micro-Influencers

How to setup events for your Facebook pixel

Now that you have your Facebook pixel added, it’s time to start collecting data about your visitors to understand better what they want.

You should set up events to optimize your sales. An event is any action on your online store, such as making a purchase or adding something to a cart. 

If you set up the Facebook pixel correctly, it’ll report these actions to your Facebook pixel in your Events Manager.

This information will allow you to target the right people with your ads.

You can automatically install the event or the entire site by setting up the event. You also have a built-in event setup tool.

We find that there are two categories of events:

  1. Standard events
  2. Custom events

1. Standard events

Standard events include actions that visitors take on your site. They’re also called customer events.

A Facebook pixel helps to track your visitors. It helps you understand how your visitors interact with your website, and this helps you improve.

Facebook offers a pre-defined set of formal events recognized and supported across its ad products.

You should use standard events to optimize your ads for conversions and build targeted audiences.

There are many standard events in a shop’s performance dashboard:

The Top Searches: Reports information on your store’s most popular searches.

Add Payment Info: This feature tracks when your online store visitors enter their payment information during a checkout process.

Adds to cart: Track when your visitors add items to the cart.

Track checkout: Tracks when someone clicks on a checkout button.

A shopping cart gets fired when someone adds an item to a shopping cart.

Inbound or Outbound? If a visitor asks you a question, he’s likely outbound. If he buys something, she’s likely inbound.

Purchase: Purchases show details of all transactions in your account for the past 30 days.

You can find the complete detailed list of standard events and the parameters on Facebook.

2. Custom events

In addition to standard events, other actions, called custom events, don’t fall inside the scope of standard events.

You can set them up with a unique name representing what you want to happen.

Use custom events to build a Custom Audience. Custom events are a great way to segment visitors and target your marketing efforts.

Map your custom events to a custom conversion so you can optimize your site using event data and get detailed attribution for your conversion.

You’ll be able to choose which standard event the custom conversion should optimize for.

Custom conversions

You can create a rule that automatically converts any URL that starts with a specific keyword into an event.

You must track specific customer actions to know which customers will make good returns. For example, you can filter all add-to-cart events to measure only the ones that include men’s shoes over $150.

You can then run highly targeted ads to encourage people to complete their purchases.

You can adapt your ad creative to better match your target audience.

Understand your customers’ journey with events.

You can plan events along the path that leads to your landing page or other pages on your website.

Many merchants do not realize that tracking customers throughout their buying experience is a powerful way to keep tabs on their activities.

Once you map your customers’ journey, you can run targeted ads that help move your shoppers down your marketing funnel and maximize your sales.

There are seven tips to increase conversions with Facebook pixel.

Follow the instructions below to use Facebook pixel for your Shopify store to get the most of it. It is a new era of the popularity of ecommerce stores. So take part in it and be successful.

1. Create Custom Audiences

Using Facebook Pixel, you can create custom audiences from your website traffic.

A custom audience lets you connect with people who have engaged with your store.

Facebook ads work best when you focus on people already in your sales funnel who are more likely to convert.

You can use Custom Audiences for two purposes:

  • To run retargeting ads;
  • To use them as a source for creating Lookalike Audiences.

There are two types of custom audiences.

Retargeting is a great way to start attracting more of your ideal customers. In this passage, we’ll cover how to use the Facebook Pixel to increase conversions on your website by retargeting. But before you dive in, let’s first understand what retargeting is.

What is Retargeting? Retargeting allows you to send a message to your current users and target them with ads on other websites. It is usually done by creating a custom audience based on your current visitors and then sending them a campaign that displays targeted ads.

This type of Custom Audience is always a winner:

1. Cart abandoners

You can create a custom audience based on people who left their cart without completing the purchase.

These people weren’t sure whether they could afford to buy the item they saw in the ad. But something was holding them back from purchasing it. They couldn’t remember if they had any credit cards or not.

Others might have been distracted by something at home.

These people weren’t sure if they wanted to buy and needed a little nudge to convert.

Consider running an ad campaign that plays on the fear of missing out. You could also run a promotion where, for example, you offer a special discount if someone purchases a certain number of units in a given period.

Your ad could say that there are only a few items left, so hurry up!

You could also offer a small discount or free shipping to make your product more attractive to potential customers.

2.  Report Your store visitors in the past 30 days.

The classic custom audience consists of shoppers who visited your website in the last 30 days.

You’ll be running an ad campaign for all website visitors, so it’s best to have broad messaging.

It’s possible to create more personalized ads by segmenting your target website visitors and targeting separate product pages.

2. Lookalike Audiences

Another benefit of custom audiences is using them as a resource to develop Lookalike Audiences.

The Lookalike Audiences feature allows you to reach out to people similar to those who have bought from you or interacted with your business in different ways, like visiting your site.

If you are creating a Lookalike Audience, you’ll have to pick the size of your audience:

The lower your percentage of the population, the less but more specific your Lookalike audience will be.

We suggest starting by focusing on 1% of those who are most likely to purchase from you.

Once you realize that you require more customers within your advertising funnel, slowly increase the amount. The Lookalike Audience will be less exact, but it will cover a more significant number of potential customers.

3. Run Dynamic product ads

Facebook’s dynamic ads allow you to run personalized product ads automatically. They let you redirect your visitors to your website with ads that showcase products they are interested in but were distracted or simply didn’t have enough time to purchase.

These ads are great for people new to advertising as you don’t have to perform many hours of manual labor.

For dynamic ads, simply upload your catalog of products to the Facebook Business Manager. Ensure you’ve uploaded all the products you want to display ads for. After that, your Facebook Pixel events will match the items from your catalog, displaying relevant ads to the right individuals.

You can choose from three different formats for dynamic ads:

  • Single image – traditional image ad;
  • Carousel – You can add and show a maximum of 10 images in one ad.
  • Collection ad – A grid-like layout ad featuring a primary image or video and four smaller images below.

4. Set up custom conversions

Did you recall how we spoke about the difference between custom and standard events a little earlier in the article? Custom conversions allow you can track more precise actions than a regular event permits you to.

The Facebook Pixel allows you to set rules for events and URLs that will help you manage the purchase or other transactions.

If, for instance, you wish to target women likely to invest more in dresses, You can limit your purchases to only those of dresses for women priced over $50. Once you have enough pixel events to allow for these customized conversions, you could utilize them to enhance the effectiveness of your ads and focus on women who are likely to pay that amount for the dress of their dreams.

5. Use Facebook conversion tracking.

You can track the actions of your online store visitors and use the data collected to see where they drop out of your funnel.

It is called conversion tracking, and you can use your tracked conversions to calculate your ROI.

Conversion tracking is also an opportunity to create your custom audiences, and you can also use conversion tracking to make more engaging ads for your product or business.

You can track conversions in three different ways with the Facebook pixel:

  • Standard events
  • Custom events
  • Custom conversions 

Conversion tracking is excellent. You can see cross-device conversions.

In other words, to improve your conversion rate, look at where your customers are falling off at the end of their journey.

For example, if a customer is watching your ad on their laptop or desktop, you can see how they saw it and whether they’re clicking through to your site. If they are, you know that person is likelier to buy from you so that you can try a new ad with similar messaging.

For example, if a customer is watching your ad on their laptop or desktop, you can see how they saw it and whether they’re clicking through to your site. If they are, you know that person is likelier to buy from you so that you can try a new ad with similar messaging.

This is why you must have an effective search engine optimization campaign. You need to be sure you’re not just throwing money into a black hole. This is where the paid search space comes in.

There’s a lot of money to be made, and a well-optimized campaign can pay for itself many times.

You’ll find your tracked conversions in your Facebook Ads Manager.

6. Track conversions from iOS 14 devices with API

Apple iOS 14 will change how your ads work for you and what you see in AdWords and Google Ads. Find out how it affects you.

If an app developer tracks its users’ activity, then with iOS 14, they will have to show a prompt to iOS 14 users.

If people choose not to track when they use your app on their device, your ads’ personalization will be limited. To help deal with this change, Facebook has introduced a solution that allows it to track the Facebook pixel conversion from iOS 14 devices.

“It’s called Aggregated Event Measurement, or API, and it’s one of the most important technologies of 2017.

To know what users will do next when viewing your website, it is now possible to collect information directly from the device they’re using to view your site.

Facebook will send a unique ID from the phone to your website. This way, you can link events on your website to a specific device.

Aggregated Event Measurement will let you measure up to 8 conversion events for each domain.

When starting a business, you’ll have to prioritize your events to determine which are most important for your business.

7. Get enough events

It’s also vital that you get enough traffic to your Shopify store.

Don’t jump to conclusions about your ads’ performance or the best structure for your campaigns right away.

For example, if 10 out of 30 add something to a cart after visiting your product page. It is about 33% of those who add something to a cart.

However, do ten events need to be enough to decide your future advertising campaigns?

You’ll probably never write a book about this topic.

Before creating your marketing strategies, ensure you have enough events on your Facebook pixel.

We recommend at least two events if you want to make an impact, but if you’re new to networking, you can start with one event.

According to Facebook, you need at least ten people to create a target audience for your ads.

With a hundred events, you could potentially start with 1,000.

The more events you attend, the more statistically accurate your results will be.

A successful event marketing strategy depends on a few key factors: how many events you should have.

How to delete my Facebook pixel from Shopify?

You may have already set up a Facebook pixel a while ago, and now you want to add a new one.

In this case, you’ll have to remove the old pixel first to make sure there are no duplicate data.

To remove your Facebook pixel from your Shopify store, you’ll need to follow:

  1. Open your Shopify admin and click on Facebook.
  2. Click Settings.
  3. Navigate to the Data sharing settings section and click Disconnect.

You may still have the pixel code in your theme.liquid file. You should remove the pixel from there, also.

  1. Go to your Shopify account and click Online store → Themes.
  2. Find the Current theme option, click Actions, and choose Edit code.
  3. Open the code editor by clicking on the theme.liquid file.
  4. See where your Facebook pixel code is between the <head> and </head> tags, then delete it with great care.
  5. Make sure to click Save.


You will find many sites online that will help you in these steps. But the main thing is your efficiency, and the question is, Can you do all this by yourself? Never mess up things in a hurry. Take your time and follow the steps while reading this article, ‘How to Add the Facebook Pixel to Shopify (For Beginners).’

Leave a Comment