Facebook is the largest online community in the world. If you run an e-commerce business you simply must consider marketing your products on Facebook. Whatever you're selling, chances are a large number of your potential buyers are on Facebook. A good way to target these potential customers is through the use of Facebook Ads. Opening an ad account on Facebook Business Manager you could begin targeting desired customer audiences who fit your buyer persona. In this blog we're going to look at how Shopify stores can improve the effectiveness of paid Facebook ad campaigns using an analytics tool called Facebook pixel.

Stick around if you wish to understand:

What is Facebook pixel?

How does Facebook pixel work?

How to add Facebook pixel id to my Shopify Store?

What is Facebook pixel?

Facebook pixel is a piece of code that when installed on your online store can monitor the behavior of your visitors. No of pages viewed, whether he/she used the add to cart feature, scroll depth and time spent on a page are some of the many events that can be tracked using Facebook pixel. Couple this with demographic information of your visitors like age, gender, location or interests you'll be able to start creating audiences who you can target with customized ads.

In short, pixel provides intelligence that be used to:

  • Run targeted ads that reach the right audience
  • Continuously monitor and improve the effectiveness of Ads
  • Enable automatic bidding to drive sales on your website effortlessly
  • Use retargeting to engage previous visitors and nudge them towards making a purchase on the checkout page.

How does Facebook pixel work?

Standard and Custom Events

To understand how pixel works let us first understand events and audiences. Once you've installed Facebook pixel code on your website it starts monitoring the activity of your website visitors. Every time they take an action(like adding a product to cart or wish list) the tracking pixel logs it as an event. These events serve as selection criteria for filtering audiences. Facebook has already compiled a list of standard events that are supported across all Facebook ad products. Some of whom are listed below:

  • Add payment info - Addition of customer payment information while making a purchase.
  • Add to cart - Addition of a product to shopping cart.
  • Complete registration - Customer registration for a service like newsletter or beta testing.
  • Contact - User has established some form of contact with company like chat or email.
  • Customize product - Had customized a product offering.
  • Initiate checkout - Has begun the checkout process.
  • Lead - Registering interest in a product or service through submission of a form.
  • Purchase - Completing a purchase.
  • Schedule - Booking of an appointment.
  • Submit application - Submitting of an application for a service/program on website.
  • Subscribe - Enrolling for a service.
  • View content - A visit to a specific page like a prominent product page or post purchase thank you page.
  • The complete list can be found here

Apart from this Facebook allows you to define custom events. A custom event is an event that gets logged by pixel based on rules defined by you. For example if the standard purchase event only lets you log complete purchases irrespective of cost of purchase. You could use custom events to track completed purchases over USD 100 by setting up custom rules. You can learn more about setting up custom events here.

Custom audiences

Using event data you could advertise to a targeted group of people on Facebook. This selection of people is called a custom audience. For example, if you wish to promote your freshly launched sweaters on your store. You could build a custom audience defined as "people who've previously visited the sweaters page of my website".

Custom conversions

A custom conversion is a form of conversion tracking similar to goals in Google Analytics. Here you use a conversion page as a milestone to track conversion for your ads. The thank you page where visitors are taken after an online sale and  the thank you page after registering for a webinar are typical example of a conversion page. You could even add a monetary value to every conversion to better track the success of your campaigns.

Further, Facebook allows you to create lookalike audiences. While custom audiences are built from past visitors of your website and therefore limited in number. You could target wider audiences who are not familiar with your store using lookalike audiences. A lookalike audience is a selection of people having matching demographics, interests, shopping trends with your best customers(existing custom audiences).

Use of Dynamic Ads

Running Dynamic Ads or Catalog Sales is a highly beneficial option offered by Facebook. Using Dynamic Ads you'll be able to advertise products from your catalog to your preferred audience automatically. This is especially useful to large e-commerce businesses who sell thousands of products. As creating individual ad for every product is not very efficient.

How to add Facebook pixel id to my Shopify Store?

Create a new pixel

  1. Log in to Facebook Events Manager
  2. Under your pixels tab select create a pixel
  3. Add your pixel name and website URL
  4. Click continue
Creating a facebook pixel

That's it, while with a Business Manager account you could create up to 100 pixels, you only need one pixel to manage conversions for one Shopify store.

Add it to Shopify

You could add Facebook pixel to your Shopify website in one of three ways:

  • Manually install code on the website

Go to Events Manager and select the pixel you want to add and click on continue pixel set up. You will see three options. Select install code manually and copy the pixel base code. Login to your Shopify admin section and find the the header of your website or locate the header template. Paste the pixel code in the middle of the header code, after <head> and before </head>.

  • Use Shopify integration

Log in to your Shopify admin and navigate to Preferences under the Online Store tab. Scroll down to the Facebook Pixel section and paste your pixel id. Click on Save.

Integrating Facebook pixel with Shopify
  • Emailing instructions to a developer

If you want to have the pixel code installed by a developer. Select email instructions under set up pixel in the pixels tab. Enter your developer's email address in the dialog box and click on send.

After you're developer is done installing the code. You could check whether its working properly on Facebook pixel helper.

Start using Facebook pixel now

Mature website analytics provide businesses with valuable insights. Facebook pixel is a great tool that can help business get the best out of their advertising budget. If you aren't already, we recommend you begin using it today to optimize your ads and grow your E-commerce businesses.