Pixels, Kit & You!

What the pixel is, how it works, and how to troubleshoot if you’re having problems.

Joshua Shessel
Hi Kit
8 min readMar 22, 2018

--

Facebook is famously opaque when it comes to the documentation of their features. Asking for straight answers from Facebook about how some of their systems work is like trying to push a wet noodle up a hill.

As a result, we have had to extrapolate quite a bit about their advertising systems through real-world experience, and it’s my hope to try and explain one of the most pervasive but least documented features on their platform: The Facebook Pixel.

What, exactly, is a Facebook Pixel?

A Facebook Pixel is a unique identifier that is installed in a website’s code that ties a Facebook Ads Platform Account and a website together. There are a few ways that a Pixel can get onto a website:

1. You install the Pixel manually so it’s included in code of your pages. This might require that a javascript inclusion be added to your main template (page.liquid on Shopify, for instance).

2. A third party app might manage your Pixel. Your mileage may vary here, and if the app isn’t properly supported you might end up with unpredictable results.

3. Some service providers will spot and insert your Pixel into the code of your site automagically to help with consistency — this is generally the ideal way to do it.

A Pixel “fires” every time a specific event happens on a site, which ends up reporting that event back to the Facebook Business Manager to let the you know what’s happening. Events like Page views, Add-to-Cart, Content Info, and checkout are all registered by Facebook Business Manager. The Pixel should register on all important pages in your shop. On the Shopify platform, the Pixel will fire on all pages by default with the exception of the payment section of the checkout which, due to security restrictions, serves no Pixel information on that screen.

When Jane Q. Public comes to your website, the Pixel fires and inserts a snippet of code — referred to as a “cookie” — into the short-term memory of their browser. Every website that has a tracking Pixel installed places the cookie in their browser, which stays around for 28 days for standard ads and 180 days for DPA, or until the user deletes their cookies.

Because the Pixel reports these events back to the Facebook Business Manager, there’s an opportunity to get some pretty granular info regarding what’s going on in your store. The Facebook Pixel is also deeply tied to how some ads are displayed on the Facebook platform.

It’s not just about tracking.

Pixels also act as a way to tailor the user experience in Facebook. A Pixel can note when a Facebook user browses a specific product on your site, and gives Facebook the ability to run Retargeting Ads (also known as Dynamic Product Ads) for that same specific product and related products in your store.

You can have multiple Pixels on your account:

Facebook understands that it won’t be useful to have a single Pixel firing for each user. Scenarios where a user might have seperate companies and websites controlled in the same Business Manager will often require you to separate that data. To answer that need, Facebook allows users to create as many Pixels as required.

How does Kit use Pixels?

Kit’s essentially a streamlined user interface for the entire Facebook platform, so the above rules more or less explain how the Pixels work, but there are a few limitations that we have when it comes to Kit’s integration.

Technically, you can run ads directly on the Facebook Ads platform, and hand pick which Pixel will fire for each advert, but since we’ve streamlined it, we try and take that step out by defaulting to use a Pixel that Kit creates when you configure your ads account.

At this time, there is no way to change which Pixel fires for each advert account in Kit. Kit needs to use the Pixel it configures for each account. This is absolutely a limitation we are working towards overcoming in the near future.

Troubleshooting the Kit Pixel

Below you’ll find a few common issues you might run into when using the Kit Pixel and how to troubleshoot them. First, I highly suggest installing the “Facebook Pixel Helper” as a Chrome extension if you’re having troubles with your pixel, since it will give you a clear idea about what Pixels are firing on an active site.

In this case, you can see only a single Pixel firing, which is ideal. All data is going to the same repository.

“I would like to change which Pixel Kit uses.”

As mentioned above, there’s very little we can do when it comes to configuring the Kit Pixel within Kit. Kit will select a Pixel it’s created or, in lieu of that, will create a new one called “Kit Pixel”. Some shop owners have expressed concerned about keeping the history on their legacy Pixels. The good news, though, is that the current version of the Facebook Pixel treats data differently than the old Facebook Pixel did.

As of October 16th 2016 Facebook introduced a new plan to streamline Pixels. They’ve transitioned from Conversions tracking Pixels to something that’s known as a “Facebook Pixel”, which is essentially a catch-all Pixel that can serve any purpose depending on the campaign. Pixels only collect and hold data for 180 days, so there’s minimal impact with switching Pixels at any point.

Facebook goes into a bit of detail about it here. Since all Pixels report back to the same Business Manager, it means your ads and analytics aren’t directly impacted by which Pixel you use.

“How do I share my Pixel with someone else?”

In cases where you’re a consultant or advertising agency, you may want to grant access or share a Facebook tracking Pixel so your clients can see the results of the campaigns.

Facebook actually has a pretty straight forward process to share Pixels that you can take a look at here.

“I’m not seeing any data on my legacy Pixel. What’s happening?”

Chances are, you might have implemented an old-style Pixel on your store from years back and haven’t functionally changed the code since then. Since you’ve installed Kit, you’re not seeing your ads reporting any activity as a result.

What’s actually happening is that the reports are going to a completely different Pixel, or the events are being split up between Pixels and the you’re getting an incomplete report. You can log directly into your Facebook Business Manager and browse to your pixels there to see what’s active.

“I’ve changed my settings, and I’m still seeing another Facebook Pixel on my page!” or “I’m getting weird results on my Pixel!”

You might see unexpected results about your Pixel if you’re a legacy store and inserted the Facebook Pixel manually in your code or the Pixel you’re using is configured incorrectly.

To correct this, log into your Shopify admin and head to the Online Store → Preferences area of your dashboard. There should be a section called “Facebook Pixel”.

This entry allows the pixel to fire in places that are generally considered “secure” and aren’t usually open to user code injections like the checkout.liquid. Check to make sure that’s the Pixel that Kit’s configured to use. If it isn’t, include the Kit Pixel there. That will insure the Pixel fires in almost all areas of your store.

There are two other places that the code might exist:

In the page.liquid itself.

Heading into the Online Store → Themes section of your dashboard, you’ll have the opportunity to “Edit the Code” of your shopify site.

Take a quick glance at the code, and a search for “fbq” there. You might see something like this:

If you see any code like this in the page.liquid in the code of the page, you’re likely seeing the culprit. This is outdated code and should be removed — however unless the you know exactly what you’re doing here, we highly recommend talking to a Shopify Guru or calling upon the person who initially made this edit before making any changes here.

In the checkout page’s “Additional Scripts” area.

You might have added something in the “Additional Scripts” area of your Settings → Checkout area of your store. You might see some Google Analytics scripts there to help with conversion tracking on Google Analytics, but if you see that “fbq” tag, you know that you might have found another possible suspect.

Again, It’s suggested you remove any additional scripts here, but with the same caveats as above– if you’re not 100% sure you know what you’re doing, tread very carefully.

“I’m seeing twice as many sales in my reports than I am actually getting in my shop!”

This is the result of the dreaded “Double Pixel Firing” issue we’ve seen with some apps on Shopify. Some apps like Trackify use antiquated Pixel schemas to work, and they end up making Pixels fire twice.

Go into your Apps area and see if you can spot anything that might interact with the Pixel. We know both Trackify and Pixel Perfect have never worked with Kit, for instance. If you see either of those apps, or any other tracking app that you suspect might be the culprit, you can:

1. Uninstall these apps. Pixel optimization isn’t required in the same way as it used to be

2. Move your user settings to a new advert account entirely, which will end up firing a different Pixel

The bottom line with Pixels:

Things can get complicated when you try to customize the function of the Pixels. Out of the box, the Pixel should work fine for you and your needs without any heavy lifting on your part. Kit creates and injects that Pixel into your code the moment you create an advert.

--

--

Joshua Shessel
Hi Kit
Writer for

Shopify Merchant Support / Meta Regional Contact for Burning Man / RPG nerd / Dog-Dad