Website Building » Shopify » How Do I Add a Facebook Conversion API to Shopify?

How Do I Add a Facebook Conversion API to Shopify?

Last updated on January 8, 2023 @ 9:03 am

Adding a Facebook Conversion API to Shopify requires a few steps. First, you need to create a Facebook Ads account and obtain a pixel ID.

Next, create a Shopify account and add the Facebook pixel code to your site. Finally, add the Facebook Conversion API to your Shopify account to complete the integration.

The Facebook Conversion API allows you to measure, optimize and build audiences for your campaigns. It also allows you to track conversions on your website and mobile app.

To add the Facebook Conversion API to your Shopify account, follow these steps:

PRO TIP: Adding a Facebook Conversion API to your Shopify store can be a great way to track conversions and optimize your ads. However, there are a few things to keep in mind before you add the code to your store. First, make sure that you have a Facebook pixel installed on your store. Without a pixel, you will not be able to track conversions. Second, make sure that the code is added properly to your store. If it is not, it could cause problems with your checkout process. Finally, test the code on a few different devices to make sure it is working correctly.
    1. Log in to your Shopify account and go to “Online Store”.
    2. Click “Manage”, then click “Edit code” under “Template.”
    3. Paste the following code into the ” Layout ” section:

<!-- Start of Facebook Conversion Code --> 
<script type="text/javascript"> 
var fb_param = {}; 
fb_param.pixel_id = 'XXXXXXXXXXXXXXX'; 
fb_param.value = '0.00'; 
fb_param.currency = 'USD'; 
(function(){ 
var fpw = document.createElement('script'); 
fpw.async = true; 
fpw.src = '//connect.facebook.net/en_US/fp.js'; 
var ref = document.getElementsByTagName('script')[0]; 
ref.parentNode.insertBefore(fpw, ref); 
})();

(function(d, s, id) {   var js, fjs = d.getElementsByTagName(s)[0];   if (d
Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.