You’ve spent a lot of money on Facebook Ads for your Shopify store with little-to-no results.
You’re frustrated. And lost. You’re feeling overwhelmed. You think to yourself, “maybe I’m just not good at this.”
Here’s the thing: Facebook changed its pixel tracking system in the past year. Your ads could have been converting, but you just didn’t know.
To get a better view of your business, you need to know where your KPIs stand.
Let’s fix that once and for all.
By the end of this article, you’ll know:
- Set up your pixel tracking system so you can see if your traffic converts into sales
- How to use the Facebook Pixel Helper Tool to dig for errors
- Clean up your site of any outdated tracking pixels
- What the exceptions are when diagnosing using the Facebook Pixel Helper Tool
- How to Track Purchase Conversion Value and Cost per Purchase
Once you know all these, I’ll teach you how to generate a report that looks like this:
Just with Cost per Purchase and Purchase Conversion Value Data, you’ll see if a campaign is working for your store or not.
Using one of my client’s data above, we now know that each purchase gives us $114 and it costs $10 per purchase. That means an 11:1 Ad ROI. That’s sweet!
Now that you understand the implications let’s get right to it.
How to Install the New Facebook Pixel Helper in your Shopify Store
First, go to your Facebook Business Manager.
Next, click on Business Manager and go to “Pixels.”
At the right-hand column of the interface, you’ll see your Pixel ID right below the account name.
Copy that number and keep it in a text editor.
Next, let’s go to your Shopify site and log in there.
Go to “Online Store” > “Preferences.” Scroll down until you see “Facebook Pixel ID.”
Enter or update the Facebook Pixel ID with the number that you’ve saved.
Now you’ve updated your site to have the right Facebook Pixel ID…
… if there was no change on your end and you got that right, let’s move to using some diagnostic tools to identify your tracking problem.
Using the Facebook Pixel Helper Tool to Dig For Errors
Next, we’ll check if the right tracking pixels are firing on the right pages (product page, add to cart, initiate checkout, and purchase).
Once that’s installed, go to your Shopify e-commerce site.
Go to your site, and proceed to the product page.
Click on the Facebook Pixel icon in your browser, and you should see something called ViewContent:
ViewContent is the default pixel that fires when a user visits a product page.
Next, click on the “Add to Cart” button, then click on the Facebook Pixel Icon again.
This time, you’ll see the “AddToCart” pixel fired with the help of the Facebook Pixel Helper.
If you see the exclamation point right before your AddToCart pixel, don’t panic…
… this does not in any way affect your tracking at all.
The warning is only for use in Dynamic Product Ad campaigns customized by you. We can automate this away with the use of 3rd party plugins in Shopify.
Your tracking will continue to be 100% fine.
Now, go to your cart and do a checkout (e.g. the part with checkout.shopify.com).
You’ll see the “InitiateCheckout” pixel, which looks like this:
Once you purchase an item, then you’ll see the “Purchase” pixel fired through the help of the Pixel Helper.
Through that process, you’ve discovered the five standard Facebook events that Shopify provides:
- PageView (any page in your site)
- ViewContent (product page)
If you’ve been running Facebook Ads for a while and you’ve added a conversion pixel before, you may encounter a situation where you have multiple tracking pixels firing, just like this:
If you know exactly why there are multiple pixels and what each is one is for, then you’re fine.
But if you’re like most shop owners, this presents a problem: you don’t know which pixel is the expiring one and which one is new.
Not knowing which pixel does what will make any of your Facebook ad analysis invalid.
The first step to getting your tracking in order is to clean up any old pixels.
Let’s do that now…
Clean up your Site from Any Conflicting Tracking Pixels
Go to your Shopify Admin panel. Click on “Online Store” then “Themes.”
Once you get to “Themes,” click on the button with 3 dots and select “Edit HTML/CSS.”
If you’re getting worried about modifying HTML/CSS, don’t worry — this will be quick and easy!
Within the Layout folder, select “theme.liquid.”
Note: If the other liquid files struck you in the image, don’t worry about those because that’s custom. The minimum required here is just the theme.Liquid file.
Next, press CTRL + F. Then type in “<!– Facebook”.
Alternatively, you can also try CTRL + F then type in “fbq.”
This should quickly select either the New Facebook pixel or the Old Facebook pixel.
How do you tell between the two if you’re not technical?
Here’s a quick guide:
To find the pattern within the code, you just need to look at the green-colored text. Shopify conveniently does color coding to help you figure out the structure of the code.
Now if you see this, then you need to delete it. Keeping this here will slightly slow down your site for no good reason.
Next, let’s find the New Facebook Conversion Pixel.
It looks like this:
This time, the pattern not only includes the green-colored text for <script>, <noscript>, etc., it also includes brown-colored text at the start and the end.
Facebook conveniently comments it with “Facebook Pixel Code” and “End Facebook Pixel Code.”
You also need to delete this if you’re using Shopify.
Why? Because you’ve already entered the Facebook Pixel ID in the first part of this article. By entering this Pixel ID, the Shopify-Facebook integration automatically installs the pixels in the right pages (that you can verify using the Facebook Helper Tool)>
By keeping this pixel here, you’re effectively running the same code twice, which slightly slows down the site (and may cause some unintended errors later on).
If you’re not using Shopify, then you keep it as is unless there’s a similar system.
Now check your Facebook Pixel Helper.
If you removed the Old Conversion Pixel, then you should see a reduction in the pixels triggering in your site.
If you still see more than 1 pixel triggering, then it means that you’re using 3rd party applications to run retargeting campaigns.
Let’s look into those quickly…
There are Still Conflicts? You could be using 3rd party applications
Identifying application conflicts is easy. Using the pixel viewer, go to any product page on your site. Next, click the pixel viewer and see anything which has a Brand Name in it.
For example, you might get pixel names like this:
These are related to the Shoelace Plugin and the Vantage Plugin.
Sometimes, you’ll need to click on the pixel name itself and check the content_id. This is how it looks like in the case of AdRoll:
Once you’ve identified all the third party applications that actively track data, you then need to put them all into one spreadsheet.
Yes, while it does sound time-consuming; but if you intend to keep the plug-in, this is necessary for you to get a handle on your ROI of your paid acquisition campaigns. The way I would normally track sites with multiple pixels is by having the standard KPIs as the rows then the apps as the columns:
So far, you know how and where the tracking pixels are triggered, and you know where all the potential sources of tracking are. Now it’s time to format your Facebook Ads Reporting to help you check Purchase Conversion Value and Cost per Purchase.
How to Track Purchase Conversion Value & Cost Per Purchase
Now that you’re familiar with all the places where your Facebook metrics are tracked, now it’s time to see all the data in action.
To see your metrics, go to Business Manager then Ads Reporting.
Then click on “Create Report” then “Columns” and finally “Customize Columns…”
Then search then enter the KPIs that you need. I suggest using these:
- Purchase (Facebook Pixel)
- Cost per Purchase (Facebook Pixel)
- Cost per Click
Once you’re done, you should see a report that looks like this. Now, you’ll have more clarity on what campaigns are working for your business based on ROI. If you had issues with your tracking earlier, then most likely this will be empty (or the data will be wrong). But if you’ve followed this guide closely, you’ll have a better view of your business after 2 weeks of running tracked campaigns.