top of page
Writer's pictureMatthew Christopher

Easy Steps to Set Up The Facebook Conversions API (Shopify & Other Platforms)

Updated: Mar 26, 2021

Advertising on Facebook has become the norm in today's age for E-commerce brands. When you have 2.7 billion users as of Q4 2020 then this is every reason to advertise on the platform.

Facebook is fantastic for businesses of all sizes as it allows you to build out campaigns to achieve objectives that fit around your business goals i.e. increasing the number of shopping sales.

To be successful on a platform like Facebook you need to optimise based on the data you receive. Data helps you to increase sales/leads and improve customer experience.


However, with digital data being the centre of attention, regulations such as GDPR are making it harder to keep track of your customer’s actions. For this reason, you as a store owner need to adapt to this ever-changing digital landscape.


One way Facebook is attempting to improve the way marketers optimise their key conversion events is through the Facebook conversions API, also known as Facebook CAPI.

This article will explain how to set up Facebook conversions API to your ecom store and maintain the most accurate data possible.

In this guide you will learn:

What is the Facebook Conversions API and Why Do You Need it?

You’re probably familiar with Pixel and other tools that help you track web and offline events (your customer behaviour and & actions) from Facebook servers to yours.

Facebook CAPI plays a major role in this data tracking. Thanks to the CAPI, you can:

  • Track and measure a wide range of your customer data

  • Track events accurately (no data lost due to ad-blocking tools, server or page crashes, etc.)

  • Control when to share and what to share

  • Fewer conversion discrepancies between your Shopify orders and Facebook purchases.

With new privacy regulations rolling out to browsers worldwide, performance tracking of your ads becomes increasingly difficult.

For that reason, you should connect the server of your store directly to Facebook. This will keep your data intact and avoid any inconvenience, misinformation, or lack of information during the tracking.

Let’s find out how to set this up...

How to Set Up Facebook Conversions API on Shopify

To set up Facebook CAPI on Shopify, you first must ensure you have the following properties set up and have administrator access to each:

  1. Facebook Business Manager

  2. Your Business’/Brand Facebook Page

  3. Facebook Instagram account

To ensure you are an administrator visit the Business Settings and navigate to the Accounts section. Once there ensure you have the 'Full Control' toggle enabled on the properties mentioned above. For example, for Ad Account access, having full control will look like the below:

Then, do the following:

  1. Go to your Shopify admin page.

  2. Click “Facebook” under “Sales Channels” on the left sidebar.
















3. Select “Settings” and then navigate to 'Data sharing settings'








4. Then scroll down to "Customer data sharing" and click Enable

You will be presented with three options:

  • Standard

  • Enhanced

  • Maximum

Make sure you select the option "Maximum".


Maximum will combine all data-sharing options to reach the highest amount of customers. It uses Conversions API, which shares data directly from Shopify’s servers to Facebook. This means the data can’t be blocked by ad blockers.

Press confirm and you will have set up the Conversion API in your Shopify store.


How to Test to see if the Facebook Conversion API is firing


This part gets a bit technical, however, if you follow the steps below you will be fine.


Firstly, head over to your Events Manager and select "Settings". Scroll down till you see Conversion API and click "Create Access Token".


Follow the instructions to generate your "Access Token".



Once generated highlight the Access Token, right-click, and press copy.


Then open up Facebooks Graph Explorer Tool in another web browser tab. Once there paste the Access Token in the Access Token section:



Go back to your Events Manager settings and copy your Pixel ID. Once copied, go back to the Graph Explorer Tool and paste the Pixel ID in the top context box, replacing any existing text. Right after the ID make sure to enter /events. It will look like the below:

In another tab open up the Facebook Payload Helper. Copy the generated code and go back to the Graph API Explorer tab.


In the first toggle in the top left corner change it to POST. Underneath make sure to navigate to JSON and replace the default code with the code you copied from the Payload Helper.


This will be your API caller data.


Right after the last square bracket place a comma and make a new line just below by clicking enter once. Once you are on this line place in the following:


"test_event_code": ""


In between the quotations at the end of this line you will need to place your test events code. To get this simply navigate back to Events Manager > Test Events > Test Event Servers and then copy the Test Code. It'll look like the below:










Once copied go back to the Graph API Explorer and paste the Test Code in the empty quotation marks. Your code is now ready to test and should look something like the below:









Verify that everything you have entered makes sense and then click the submit button in the top right. If everything goes according to plan a message confirming one event has been received will appear in the middle area of the Graph Explorer Tool.






After this go back to your Events Manager in the Test Events section and you should see your Conversion API call being successfully received:


And there you have it! That is how to successfully test your Conversion API events. You can test any other event such as View Content or Add to Cart just by simply changing the event name in the JSON code.


If you want additional support on this I would advise you to contact the Facebook Help Centre.


How to Set Up Facebook Conversions API on Other Platforms

If you’re using another platform to power your ecommerce store (WordPress, WooCommerce, Zapier, etc.), you can still implement conversions API.

This time, head to your Facebook business manager. Then, follow these simple steps:

  1. Click the dotted Business tools button in the top-left of the screen to display the dropdown menu.

  2. Select “Events Manager.










3. Choose your business from the top-right dropdown and then click 'Add Events' just underneath the 'All activity' graph to be able to select the 'Using the Conversion API' option.













4. From here you can select 'Use a partner integration'


You can select the following displayed in the image below:



5. Whichever partner you choose you will just need to set up the Facebook Conversion API by following the platform's instructions. For example, if you had chosen WordPress the instructions will be displayed as below:


And that’s it. Now you can track all conversions on the platform directly from your Facebook account.

What If I’m Using a Platform That’s Not on Facebook’s Partner List?

Unfortunately, the partner integrations are limited at the moment.

Other e-commerce platforms such as Wix, Squarespace, and Big Commerce do not currently provide easy installation methods for CAPI. However, you can use a developer to add the CAPI code directly to the website. Facebook for Developers has useful resources to install the Conversion API directly to the website which can be found here.

However, with all the data sharing changes coming into play such as cookies becoming removed from the likes of Google in 2022, it will become mandatory for website building platforms to have easy solutions in place for their users to implement server-to-server tracking.

All we can do is wait.

Which platforms do you use to power your eCommerce store? Have you managed to implement Facebook CAPI? Share your experience in the comments below.


If you do need assistance with tracking setup or Facebook ads management please schedule a call with our team and we can see how we can help your business.

Comments


bottom of page