DEV Community

Cover image for How to Set up Facebook Conversion API on Shopify
Gloria Maldonado ✪
Gloria Maldonado ✪

Posted on • Originally published at dev.to

How to Set up Facebook Conversion API on Shopify

Having accuracy problems tracking data through Facebook Pixel? Hold on: It’s time to sing the Facebook Conversion API’s praises as it will help you secure much better results in no time.

Your browser-based, vintage Facebook Pixel fails to deliver accurate and consistent data due to ad-blockers, cookie blockers, etc. because it works on the browser side. On top of all that, the latest iOS updates put you in a tight spot when it comes to tracking & monitoring data through Facebook Pixel.

The Facebook Conversion API comes to the rescue, though. It works on the server side and gets all your purchase data in the back end, providing much better results at the end of the day.

Here, I’ll help you to set it up on your Shopify store - with no additional apps required.

3 Things You Should Do Before You Set Up Facebook Conversion API on Shopify

There are a couple of things to get done before taking action. First things first, you need to make sure that you:

  1. Install the Facebook Channel App on your Shopify store.
  2. Get Facebook Business Manager with admin rights.
  3. Use the native FB app to set up FB CAPI on your Shopify store.

The Easiest Way to Set Up Facebook Conversion API on Shopify

You can benefit from the native integration using Facebook Sales Channels to secure a solid setup that works. Just follow the steps below:

1- Navigate to the Shopify Admin > Online Store > Preferences > Setup Facebook

Navigate to the Shopify Admin > Online Store > Preferences > Setup Facebook

2- Authorize your FB Business Manager account and select the pixel. Make sure you opt for ‘Maximum’ to let all the data possible flow. Then, confirm.

Authorize your FB Business Manager account and select the pixel

How to Validate Your Facebook Conversion API on Shopify

The native Facebook Conversion API setup on Shopify includes the browser pixel as well, and this is very useful for your validation. You should first check the Facebook Pixel to see if it includes the variables/data that FB CAPI needs.

Step 1: Check browser-based Facebook Pixel

Go ahead and download a Chrome extension named Facebook Pixel Helper to kick things off. Then, go to your Shopify store’s homepage.

Here, you should activate the extension. To do that, click the icon on the upper right corner and then the little pin icon as you can see below.

Step 1: Check browser-based Facebook Pixel

Important: Keep in mind that you need to deactivate your adblockers, if you have any, because they cause a malfunction by blocking the Facebook Pixel.

After you activate the extension as told above, go to your store’s website. You should now see the extension like this:

You should now see the extension like this

Here, the PageView should be triggered on your homepage. Ideally, I recommend that you make use of one pixel but some merchants might want to do multiple pixels although it’s not a good practice.

You can see the Event ID when you click the PageView event.

You can see the Event ID when you click the PageView event

Here’s a quick reminder that you can use the Event ID to de-duplicate events. Visit this page to get more in-depth information on the topic.

Also, you can go to a product page on your store and see the ViewContent event on your FB Pixel Helper. It lets you monitor product-level data such as ID, price, name, category, etc. as shown below:

Also, you can go to a product page on your store and see the ViewContent event on your FB Pixel Helper

At this point, you can level up your pixel by taking the following actions:

  1. Navigate to FB Pixel Settings > Automatic Advanced Matching.
  2. Re-adjust the settings (set all of the fields ON)

Re-adjust the settings

At this juncture, there's yet another thing to do so that you can get the best out of pixel: You need to navigate to FB Pixel Settings > Automatic Advanced Matching. Then, you should re-adjust the settings that are already in use. That's to say, make sure you set all of the fields (from Email to External ID) ON.

Step 2: See your data on Facebook Business Manager

You can go to FB Business Manager > Events Manager > Pixels section to check your data. It would be wise to say that you should check your data after a couple of days as it takes some time for the data to be monitored.

Then, navigate to Facebook Business Manager > Data Sources > Events Manager

Then, navigate to Facebook Business Manager > Data Sources > Events Manager

Here, you need to make sure that you check the correct pixel - you can compare the Pixel IDs.
Then, you can see the events listed. You should see “Browser - Server" in some events to understand everything works well.

You should also check the "Last received X minutes ago". Although it’s not updated instantly, you can see your data here in a couple of hours. For instance, if you can’t see some data related to a purchase here after 12 hours or so, it means that there’s something wrong with the setup.

You should also check the Last received X minutes ago

Then, click “Purchase” and see the parameters section, the last received time, and then click View Details as you can see below:

Then, click “Purchase” and see the parameters section

You should also see all of your latest sales in detail once you go to the Recent Activities:

You should also see all of your latest sales in detail

You can see the Event Parameters section to monitor which parameters are being sent - and whether they are being sent correctly.

Just some useful tip here: you can see the order details in the URL section. This helps you detect which orders are being counted and which ones are not so that you can have a much better idea on what’s going on.

Everything is set! Are you ready to set up Facebook Conversion API on your Shopify store and make much more of your data?

Top comments (5)

Collapse
 
domainraporu profile image
Domain Raporu

Should I disable the native Facebook Pixel - Shopify integration?

Collapse
 
gloriamaldonado profile image
Gloria Maldonado ✪

I recommend using the official Facebook App for your product feed, Facebook Pixel, and Facebook Conversion API setup. I can say that the native integration works well when you complete the setup properly. If you are on a Shopify Plus plan, you can try Analyzify’s Facebook Conversion API connection as you can get more data compared to the native integration.

Collapse
 
domainraporu profile image
Domain Raporu

Thanks 👍

Collapse
 
saifur_tanvir profile image
Saifur Tanvir

Explained So Nicely!!!!

Collapse
 
gloriamaldonado profile image
Gloria Maldonado ✪

Thanks 😊