Facebook & Instagram

Shopify

How to set up your Shopify Facebook Pixel

What is a Facebook Pixel?

A Facebook Pixel is a piece of tracking code that you can add to your Shopify store. Every time someone visits your website pages the Pixel tracks where they came from and what they do on your site. Facebook stores this tracking data so you can improve the targeting and performance of your Facebook, Instagram, Messenger and WhatsApp ad campaigns. Your Pixel also gives you access to Facebook Analytics which can provide richer customer data than Google Analytics.

What are the benefits of using a Facebook Pixel with my Shopify store?

We highly recommend adding a Facebook Pixel to your Shopify store as it provides many benefits that help you improve conversion and make your advertising more effective.

1. Get richer insights about your website visitors

Around 2.4 billion people use Facebook every month, with two-thirds of them using it every day. To say that Facebook knows quite a lot about their users is a bit of an understatement.

Adding a Pixel to your website enables you to get access to some of this rich data (at an aggregated level) for the people who visit your website. You get much of the data you’d expect to see in Google Analytics but you also get better demographic information with Facebook Analytics – primarily around the age and gender of your website visitors.

2. Track website visitors across devices

As so many Facebook users check their Facebook feeds regularly they are typically logged in to Facebook on multiple devices – their desktop computers, tablets and mobile phones. This means Facebook can track user behaviour across devices. So if someone saw your ad on their mobile phone going to work in the morning and later visited your website on their work computer Facebook would know it was the same person and be able to attribute that mobile ad to a visit to, or purchase on, your website. This information is crucial in improving the targeting of your ad campaigns.

3. Retarget website visitors with custom audiences

Tracking your website visitors with the Facebook Pixel enables you to create custom audiences for any ads you want to run on Facebook, Instagram, Messenger and WhatsApp.

For example, you could create an abandoned cart custom audience and run a retargeting campaign to show product ads to people who had visited your site, added some items to their cart but did not complete a purchase. Or you could run ads to retarget people who viewed a particular product when you have a promotion on that product.

4. Find new customers with lookalike audiences

Lookalike audiences is a powerful feature of Facebook Ads and a very effective way to find new customers. It enables you to create an audience that looks like one of your custom audiences so you can run ads targeting them. For example, you could create a custom audience for all customers who spent, say, over $200 with you over the past month and then ask Facebook to build a lookalike audience of these customers. Facebook would use the data it has about these customers to find other Facebook users who have similar characterisitcs and then you can target your ads at these people.

How do I create a Facebook Pixel?

If you already have a Pixel you’d like to use skip to the next section for instructions on how to add it to Shopify.

Before you can create a Facebook Pixel you need to have a Facebook Business Page and a Facebook Ads account. If you don’t have these you can follow our step-by-step instructions here:

The instructions below show you how to create and install a new Facebook Pixel if you don’t already have one for your store or you’d like to create a brand new one.

1. Log in to Facebook Events Manager. Click the Get Started button on the right.

create facebook pixel step 1

2. On the popup enter a name for your pixel, enter your Shopify store domain and click Continue.

create facebook pixel step 2

3. You will see three options for installing the Pixel on your Shopify store. The simplest option is to choose Add code using a partner integration.

create facebook pixel step 3

4. Select Shopify from the list of partners.

create facebook pixel step 4

5. Leave advanced matching switched on and click Continue.

create facebook pixel step 5

6. Go to your Shopify admin dashboard. Click Online store in navigation menu on the left.

create facebook pixel step 6

7. Click Preferences and scroll down to the Facebook Pixel section. Go back to your Facebook tab and copy your Pixel ID and paste it in the box on your Shopify Preferences screen. Click Save.

create facebook pixel step 7

8. Return to your Facebook tab. Click Continue.

9. To verify that your Pixel is set up correctly type your website domain into the box and click the Send Test Traffic green button on the right. This will open up a new tab on your browser and load your Shopify website.

create facebook pixel step 8

10. Return to your Facebook tab. After a little wait you should see that the red dot has turned green and “No activity yet” has changed to “Active”. Click Continue.

create facebook pixel step 9

11. You should see a message saying that your setup is complete.

create facebook pixel step 10

How do I add a Facebook Pixel to my Shopify store?

You can add your Shopify Facebook Pixel either via the Shopify mobile app or via the Shopify admin website. We provide step-by-step instructions for both. If you don’t have a Pixel you’ll need to create one first by following our instructions in the section above.

Add a Facebook Pixel using the Shopify mobile app (iOS or Android)

1. Open the Shopify App on your mobile device and press the Store icon in the bottom right corner.

2. In the Sales channels section press Online Store.

3. Press Preferences.

4. Scroll down to the Facebook Pixel section. Copy your Pixel ID from your Facebook account here and paste it into the Facebook Pixel ID box.

5. Press the Save button.

That’s all! Now your Facebook Pixel ID has been added to all the pages on your Shopify website.

Add a Facebook Pixel using the Shopify admin website

1. Log into Shopify admin on your desktop computer

2. In the Sales channels section click Online Store.

3. Click Preferences.

select preferences

4. Open up Facebook Events Manager and copy your Pixel ID.

copy pixel id from gacebook events manager

5. Return to your Shopify admin browser tab and scroll down to the Facebook Pixel section. Paste your Pixel ID into the Facebook Pixel ID box.

add pixel id to shopify preferences

6. Click the Save button at the top right of your screen.

That’s all! Your Facebook Pixel ID has been added to all the pages on your Shopify website.