Article How to add Facebook Pixel to Shopify

If you plan on running Facebook Ads for your Shopify store one of the most important things you can do is configure the Facebook Pixel. Facebook Pixel helps optimize and improve your Facebook Ads experience and is an important piece of any Shopify store. It's so important in fact that Shopify has made it relatively easy to integrate with Facebook Pixel. Read all the steps you need to get started below, as well as some advanced Facebook Pixel tips.

What is the Facebook Pixel

The Facebook Pixel is a piece of code that you put on your website that allows you to measure the effectiveness of your advertising. It collects data about how your users arrive at your store and what actions they take once they get there. It helps you measure the sales generated from Facebook ads, remarket to people who arrived at your store but didn't make a purchase, and create custom audiences for future ads.

The Facebook Pixel improves the conversion rate of your Facebook ads by telling Facebook which types of users are making purchases, and which ones are not, so that it can tweak the target audience of your ads for you.

You can use the data that Facebook Pixel collects from the users of your website to create custom lookalike audiences to help you create advertisements for the perfect audience for your store.

Facebook Pixel is also used to create retargeting ads to show ads to people who visited your site but may not have made a purchase.

Step 1: Create Facebook Ads Account

Before you can create the Facebook Pixel you must first create a Facebook Ads account. To create an account go to Facebook.

Step 2: Create Facebook Pixel

Next you need to actually create the Facebook Pixel itself. The Facebook Pixel is created and managed in the Facebook Ads Manager dashboard.

  1. Go to the Facebook Ads Manager website.
  2. Navigate to the Pixels section of the website by opening up the menu and clicking on Events Manager > Pixels
  3. Navigation to the Facebook Pixel page
  4. Click on Create Pixel
  5. Create Facebook Pixel screen
  6. Give your pixel a name and click Continue
  7. Name Facebook Pixel
  8. When prompted with the Install Instructions window go ahead and close that window.
  9. Facebook Pixel installation instructions

Now our Facebook Pixel has been created, and the next step is to connect it to Shopify.

Step 3: Connect Facebook Pixel to Shopify

Now that you have the Facebook Pixel created it's time to actually connect it to your Shopify store. Shopify was kind enough to make this a really simple process.

  1. The first thing you need is to get your Pixel ID.
  2. Go to the Facebook Ads Manager website.
  3. Navigate to the Pixels section of the website by opening up the menu and clicking on Events Manager > Pixels
  4. Your Pixel ID is the long string of digits under the name of your pixel. Take note of this number.
  5. Facebook Pixel Id
  6. Next you need to enter the Pixel ID into the admin section of your Shopify store. Go to the Shopify Admin website. Then navigate to Online Store > Preferences
  7. In the Facebook Pixel section, paste in your Pixel ID and click save.
  8. Shopify facebook pixel settings box

Step 4: Test that its working

At this point our pixel should be created and configured with Shopify. Now it's time to test that the pixel is working. The best way to do this is to install the official Facebook Pixel Helper plugin for Google Chrome.

  1. Go to the Chrome web store
  2. Search for the Facebook Pixel Helper plugin
  3. Click Add to Chrome
  4. Click Add extension in the pop-up
  5. After the plugin is installed, navigate to the homepage of your Shopify store. If your Facebook Pixel is successfully installed, the Facebook Helper plugin should pop up a notification indicating as such
  6. Facebook Pixel verification pop up

Advanced Facebook Pixel Usage

Just by installing the Facebook Pixel on your shop you automatically get quite a bit of value out of it. It sends audience and behavioral information back to Facebook to improve conversion rates on your ads as well as help you track the revenue generated by each ad in your Facebook Ads Manager. To step up your pixel game even further there are some more advanced techniques to squeeze even more power out of the Facebook Pixel. These include creating custom conversions and custom audiences.

Creating Custom Conversions

The pixel automatically tracks certain standard events on your Shopify store. This event data is used to better understand the behaviour of your customers.

Below are the nine standard events that are automatically tracked:

Event name Event description
ViewContent When a visitor views a page, for example a product page
Search When a visitor makes a search
AddToCart When a visitor adds a product to the shopping cart
AddToWishlist When a visitor adds a product to a wishlist
InitiateCheckout When a visitor clicks on the checkout button
AddPaymentInfo When a visitor enters payment information in the checkout
Purchase When a customer completes a purchase and views the thank you page in the checkout
Lead When a visitor clicks a sign up, for example a click to signup for a trial
CompleteRegistration When a visitor completes a registration form, for example a signup for a service

To go beyond this basic set of events you can create your own custom conversion event that falls outside of the scope of one of these standard events. A custom conversion is created by selecting a completion page. The completion page is typically some kind of thank-you page that your customer lands on after completing a given action. For example, if you want to create a custom conversion for tracking sign ups to your mailing list, the completion page would be the "thank you for signing up to our mailing list" page.

To create your own custom conversion:

  1. Go to your pixel management page on Facebook Ads manager and click on the Create Custom Conversion button
  2. Create custom conversion button
  3. In the creation dialogue that comes up, set the URL rule to the webpage that should trigger your custom event. For example if you want the custom event to trigger on the webpage http://my-store.com/thank-you, set the URL rule to equals http://my-store.com/thank-you
  4. Pick a name and category for your event and click create
  5. Create facebook pixel custom conversion

Custom Audiences

In order to create retargeting ads on Facebook you must first create a custom audience. You can't choose a specific customer to target for an ad but you can advertise to groups of users depending on their behavior. This group is called a custom audience.

A few examples of a good custom audience to retarget are:

  • People who added an item to the cart but never completed the checkout process
  • People who visited your site in the last 30 days
  • People who have viewed a specific product on your website

To create your own custom audience:

  1. Go to your pixel management page on Facebook Ads manager and click on the Create Audience button and select Custom Audience
  2. Create custom audience button
  3. The options dialogue that pops up is where you can define your custom audience. You can define your custom audience from your website based on which pages they did or did not visit, and by the timeframe which they visited your website.
  4. Fill out custom audience
  5. Once you are done just click Create Audience

Do you want to make better marketing decisions?

Try ThoughtMetric and start understanding the performance of your e-commerce marketing today.

Sign up for free