How To Setup Facebook Conversion API: Step-by-Step Guide

facebook conversion api

On this page

Welcome back to our comprehensive series on server-side tracking for Shopify merchants! In our previous blog, we delved into the nuances of Shopify server-side tracking, guiding you through the steps of setting up server-side tracking. Continuing our journey to equip you with advanced tracking knowledge and tools, this post will introduce an option to implement server-side tracking: Facebook Conversion API.

As e-commerce continues to evolve rapidly, leveraging precise and efficient tracking methods has become crucial for optimizing advertising strategies and staying compliant with privacy regulations. In this blog, we will explore how to set up Facebook Conversion API and why it is an indispensable tool for any Shopify merchant. Let’s dive in and discover how you can enhance your e-commerce business’s digital footprint effectively.

Understanding Facebook Conversion API

The Facebook Conversion API or CAPI is a powerful tool designed to help marketers track user interactions and conversions directly from their servers to Facebook Ads Manager. This approach is a significant shift from traditional browser-based pixel tracking. It offers a range of benefits that enhance both the accuracy and the privacy of data collection.

What is the Facebook Conversion API?

Traditionally, Facebook has relied on the Facebook Pixel, a snippet of JavaScript code that tracks user interactions on websites, such as page views, form submissions, and purchases. This tracking is done on the client side, meaning it occurs within the user’s browser. The 

Facebook Conversion API, on the other hand, takes a different approach by allowing these interactions to be sent directly from your server to Facebook. This method bypasses the browser entirely, reducing dependencies on cookies and other browser-based storage, which are increasingly being blocked or restricted due to privacy settings and ad blockers. Facebook conversion API is a more reliable and efficient way to ensure accurate Facebook ad performance without relying solely on browser-based tracking.

How does Facebook Conversion API work?

The server-side tracking Facebook works by allowing advertisers to directly send events from their server systems to Facebook, bypassing traditional browser-based tracking mechanisms like cookies. This method offers several advantages, including increased privacy and data accuracy. Here’s a detailed look at how the CAPI functions:

How does Facebook Conversion API work?

Event collection

Instead of collecting data from user interactions on a website through a browser (as done by the Facebook Pixel), the Conversion API collects data related to user actions that are processed on the server. This includes actions such as purchases, form submissions, or any other key events that occur as part of the user journey on an e-commerce site or app.

Data processing

When an event occurs, such as a user making a purchase, the relevant data (e.g., transaction details, user information) is captured by the business’s server or backend system. This data must include event-specific information that Facebook requires, such as event name, time, and any parameters specific to the event (like purchase value).

Data transmission

The collected data is then sent directly from the server to Facebook via the Conversion API. This involves formatting the data into a structured request that matches Facebook’s API specifications. The request is made using an HTTPS POST method, ensuring secure data transmission.

Integration with Facebook systems

Once Facebook receives the data, it is processed and matched against Facebook user profiles, similar to how data collected by the Facebook Pixel server-side is processed. The key here is Facebook’s ability to match the data sent from the server with actual user accounts, using data points like email addresses or phone numbers (hashed for privacy).

Event matching and attribution

Facebook utilizes advanced matching algorithms to attribute the server-sent events to specific users who have seen or interacted with ads. This helps in accurately tracking conversions and assessing the effectiveness of advertising campaigns.

Feedback and optimization

The results are fed back into the Facebook Ads Manager, where advertisers can analyze the performance of their campaigns. Advertisers can use this data to optimize future ad spend, targeting, and creative content based on the insights gained from the reported conversions.

We can say that CAPI functions as a sophisticated analytical tool, providing businesses with a nuanced understanding of customer interactions and behaviors. Its ability to translate data into strategic insights elevates the decision-making process, enabling businesses to thrive in the competitive landscape of digital marketing.

Analyze the performance with NestAds

Should we use Facebook Conversion API or Facebook Pixel?

The CAPI and the Facebook Pixel are both tools designed by Facebook to help advertisers measure the effectiveness of their advertising by understanding the actions people take on their websites. 

The primary distinction between Conversion APIs and Facebook pixels is the type of data they capture and share, especially because users can easily become confused between these two essential tools. So, let’s explore the key differences between Facebook server-side tracking and Facebook pixels provided in the table below to find out which tool is better for your e-commerce business.

FeatureFacebook PixelFacebook Conversion API
Data Collection Method– Collects data client-side (browser-based)
– Data is collected and sent by the pixel owner (you do not own the data)
– Collects data server-side
– Own the first-party data created, enhancing data control and ownership
Dependence on BrowserHigh (affected by ad blockers, cookie restrictions)Low (independent of browser conditions)
Privacy and SecurityLess privacy-focused (uses cookies)More privacy-focused (server-side control)
Data AccuracyCan be compromised by browser issuesMore reliable and stable
Offline Conversion TrackingLimited mostly to online interactionsCan track both online and offline conversions
Customization and FlexibilityLimited customization of JavaScript codeHigh customization of data sent and events tracked
Implementation ComplexityRelatively simple (adding code to website)More complex (requires server configuration)

We can easily see that Conversion API, Server-side API is similar to Facebook Pixel but is much greater because you share data server-side with the server directly with you. These conversion tracking methods are more flexible due to their use of pixels and can also capture the interaction of the website.

How to set up Facebook Conversion API for Shopify? 

Setting up Facebook server-side tagging on Shopify can significantly enhance your ability to track user actions and manage data privacy more effectively. This integration ensures that you capture and attribute conversions accurately, even in environments where traditional browser tracking methods like cookies are restricted. Here’s a step-by-step guide on how to set up the Facebook Conversion API on your Shopify store.

Step 1: Prepare your Facebook Business Manager

Create and configure a Facebook app:

  • Go to the Facebook for Developers portal and create a new app. Choose the app type that best fits your business needs.
  • Add the Marketing API to your app.
  • In the app settings, ensure your app is properly linked to your business by connecting it to your Facebook Business Manager account.

Generate system user and access token:

  • Within your Facebook Business Manager, navigate to the “Users” section and create a system user.
Facebook pixel server-side tracking: Generate system user and access token
  • Assign the necessary roles (typically admin or developer) to this system user.
  • Generate an access token for the system user. This token will authenticate the API requests sent from Shopify to Facebook.

Step 2: Set up the Conversion API on Shopify

Install Facebook sales channel in Shopify: Go to Shopify Admin > Online Store > Preferences > Set up Facebook

Setup facebook conversion API: Install Facebook sales channel in Shopify:

Configure data sharing settings: Authorize your FB Business Manager account and choose the pixel

Setup facebook conversion API: Configure data sharing settings

Moving on to an important part: Data sharing settings. Here, you determine the depth of your tracking with three levels to choose from: Standard, Enhanced, and Maximum.

**Option 1: Standard Setting (Not Recommended)

  • Utilizes Facebook Pixel, a third-party cookie, for data collection.
  • Vulnerable to browser-based ad blockers, limiting data collection accuracy, especially on browsers like Safari and soon-to-be Chrome.

**Option 2: Enhanced Tracking (Recommended Minimum)

  • Incorporates Facebook’s Advanced Matching for improved data accuracy.
  • Activated in Facebook’s Pixel Settings, enhancing tracking capabilities beyond the basic standard option.

**Option 3: Maximum Tracking (Recommended for Optimal Results)

  • Activates Facebook’s Conversion API, ensuring comprehensive data collection.
  • Provides maximum data, higher attribution, and superior advertising results, offering a robust solution for businesses aiming for optimal performance.

We recommend you should choose Maximum so that all the important data will be shared. Then, click on the confirm button, and now you’re ready.

If you go with Enhanced or Maximum make sure to check browser-based Facebook Pixel.

Facebook server-side tagging: Check browser-based Facebook Pixel

You need to go into FB Pixel Settings > Automatic Advanced Matching. Following that, you check again to ensure that you activate all the fields, starting from Email and extending to External ID.

Step 3: Implement the Conversion API Events

Define and map events:

  • Determine which conversion events you need to track, such as ‘Purchase’, ‘Add to Cart’, and ‘View Content’.
  • Configure these events within Shopify’s Facebook channel. Shopify automatically maps several standard e-commerce events to corresponding Facebook events.

Customize event data:

  • For any custom events or additional data you want to send, you may need to modify your Shopify theme code or use Shopify apps that support the Facebook Conversion API to capture and send this data.

Step 4: Test and validate your integration

  • Access the Test Events Tool from the Facebook Events Manager to test and verify that events are being sent correctly from Shopify to Facebook.
  • Send test transactions and monitor if they appear correctly in the Events Manager, checking for any discrepancies or errors.
Step 4: Test and validate your integration

Step 5: Monitor and optimize

  • Regularly check the performance of your setup in Facebook’s Events Manager. Look for insights on data accuracy and event matching.
  • Monitor the effectiveness of your Facebook ads based on the conversion data received through the API.
  • Ensure your use of the Facebook server-side Conversion API complies with data protection laws like GDPR.
  • Use the insights gained from the API data to optimize your ad campaigns.
  • Adjust targeting, ad spend, or creative based on the precise data provided by the server-side tracking.

Why do we need to set up Facebook Conversion API?

Setting up Facebook Conversion API server-side is essential for businesses. With privacy-focused browsers and ad blockers limiting data collection, this advanced tool ensures accurate tracking and compliance with regulations. Based on the server-side tracking definition, let’s explore several reasons why setting up server-side tracking on Facebook is imperative for businesses aiming to stay ahead in the competitive online marketplace.

Why do we need to set up Facebook Conversion API?

Overcoming data tracking challenges

Now, privacy-focused browsers and ad blockers create hurdles for Shopify brands in collecting customer data. These technologies block Facebook pixels, making it difficult to establish identity resolution. Facebook Conversion API can help drive better ROI from ads since it provides accurate, up-to-date information on user activity and behavior that helps Facebook’s machine learning to find target audiences faster.

Adapting to iOS regulations

The introduction of iOS 14.5 adds complexity by mandating explicit customer consent for data collection. To navigate this requirement and comply with Apple’s privacy policy, Shopify store owners must adopt Facebook Conversion API. This method, relying on server-side tracking rather than browser-based methods, ensures secure and reliable data transmission, effectively overcoming the challenges imposed by iOS updates.

Ensuring compliance and reliable tracking

To uphold compliance and accurate data reporting, setting up Facebook Conversion API for event tracking is imperative. By embracing server-side tracking, brands can sidestep user-blocking and disabling commonly associated with browser-based techniques. This approach guarantees consistent and secure data flow, enabling brands to measure and optimize campaign performance seamlessly, regardless of evolving privacy and browser restrictions.

Track conversions on Facebook effectively with NestAds

While Facebook Conversion API offers many advantages, it does come with specific limitations. One major drawback is its struggle to bypass iOS’s privacy restrictions, particularly affecting tracking insights for Apple users. Additionally, the complex setup often leads to wasted time and resources for businesses.

The good news is that NestAds resolves all these issues. By utilizing NestAds Pixels, you can effortlessly overcome the limitations of Facebook Conversion API. It not only ensures accurate server-side tracking and in-depth insights into user behavior but also simplifies the entire process with just one click, making your marketing efforts more efficient and effective.

Let’s embrace the power of NestAds Pixels to gain accurate insights, boost conversions, and save time. Don’t miss out – transform your online presence now with NestAds!

Looking ahead, our next blog will shift focus to another pivotal platform by guiding you through the setup of the TikTok Events API. This blog will equip you with the necessary tools to leverage TikTok’s growing audience and dynamic ad environment, further broadening your e-commerce business’s reach and impact. 

Just For You

NS Product Variants 1.4: Variant Images for Smarter Displays

If you’re an online shopper, you may know how important it is to see clear product demonstration photos before making purchasing decisions. That’s why variant images that fit well with ...

11 min

NestScale x BSS Commerce: Unlock the Full Potential of Shopify

We’re thrilled to announce a new partnership with BSS Commerce, a leading global eCommerce agency. They provide cutting-edge technology solutions to B2B, B2C, and B2B2C businesses worldwide. Together, we’re set ...

11 min

Customer Lifecycle vs Customer Journey: Are They The Same?

Recently, when we talk to some of our clients, they often ask these questions: “Aren’t the customer journey and life cycle referring to the same things?” “When do we need ...

11 min
Ready to unlock your business growth today?

Accelerate your growth with a purpose-built app ecosystem for brands and agencies.