In this article, we will show you how to use Facebook Conversions API with CloudCart.

Currently, Facebook CAPI is a redundant data channel but in all likelihood in the future it will become a main channel for data events. The web version of Facebook pixel is remaining the main data source for the moment. To be able to use Facebook CAPI, you have to do it simultaneously along with Facebook Pixel. For now you can't switch to Facebook CAPI only, you have to use it in tandem with the browser based pixel to send the same conversion events (e.g. ViewContent, Purchase, AddToCart, InitiatedCheckout).

According to recent changes, Apple's iOS14 will give users more control over security by preventing advertisers from tracking off-platform activity through third-party browser cookies. The Conversion API (CAPI) is a  revised version of what Facebook used to call the Server-Side API (SSAPI) and it allows sites to create custom events that could then be passed from a site’s server to Facebook for attribution. While Browsers block cookie data from being passed on the browser side, they can't block the data that is passed on the server side. So it will only become more valuable in time to use Facebook CAPI for passing this data from your server.

How to implement FB CAPI with your store?

1. First, you need to go to Apps > Facebook Dynamic Ads. If your application is already installed and set you should edit settings from the corresponding button. 

Take a look of this article if you haven't installed the app in your store yet.

2. Scroll down to the very bottom where you will see the option to enable CAPI in the Facebook Conversions API section. Turn it ON from the button. Enabling this channel requires payment. This feature is paid. All the other features you see are free of charge (FB Pixel ID, Product catalog, etc.). 

3. In order to integrate with the Facebook CAPI you need to add an Access token and if you want to test the events you will also need test event code. 

Where to get the access token and the test event code from?  

1. Go to From Business manager select Event manager and then select the pixel you are using for your website.

2. Go to Settings, scroll down to the Conversions API section and click on Generate access token. Copied the generate access token and paste it into the corresponding field in your admin panel.

3. In order to test the events that are sending to Facebook and verify the connection, go back to the Events Manager, Test Events section.

  • To test your browser events and check whether the events from the web browser are received correctly, enter your website URL in the field and click on the Open website button.
  • To test server events, the conversions one, copy the event code and paste it into your admin panel and click the Save button

To continue to monitor and analyze the behavior of your customers, Facebook has made possible these same events to be sent from the server instead of the browser. This way, even the events of a user who browses in private mode will be shared with advertisers through the server.  

Aggregated Event Measurement

Facebook's Aggregated Event Measurement is a protocol that allows for measurement of web events from iOS 14 users.

Go to Overview > Aggregated Event Measurement to configure events to use aggregate event measurement. You can assign the events that you believe matter most for your business based on the recent campaigns.  

To select events, click on Configure Web Events button.  The next thing you have to do is to verify your domain

Once you have verified it, click on the Manage Events button.

Modification to events will automatically pause ad sets that are impacted by the event change for 72 hours.

You can send up to eight events to Facebook through the Conversions API.

Select the pixel for which you are adding an event and select the appropriate event. Currently, you can send ViewContent (customer is at the product page), AddToCart, AddToWishlist, Search, InitiatedCheckout (customer has started the checkout process), Purchase events.

Enable Extended ViewContent - if you enable this option from the settings of Fcebook Dynamic Ads app in your admin panel means that the ViewContent event will be fired not only on the product page but on the product listing page as well. All information on the listing page, such as product identification number, quantity, prices, titles, basically everything related to the page, will be sent to Facebook to get much more accurate targeting based on your customers' behavior.

You can prioritize events. The first event has the highest priority, the last event on the list has the lowest priority. You can rearrange events based on your goals. When you have selected the events and their order, click submit and confirm your choice.  Note that you must wait 72 hours before changing these events again.  

Test your events before moving to production mode. From an IOS 14 device, you can, for example, add some product to the cart and if everything works properly you should expect AddToCart event to appear in the Test Events section. It usually takes some time. 

You can check if all your events are received correctly. When you are ready you can remove the Test Event Code from the settings of Facebook Dynamic Ads. This will enable your application, your Conversions API in production mode. Adding Test Event Code means that your events will be tracked too. 

Deduplicated events - Facebook receives events from both the browser and the server. When there are two events with the same ID, Facebook deduplicates the server event. However, when there is no browser event, the cases in which the user uses a privacy shield, the server event is taken into account.  

That's all you need to do to implement Facebook CAPI with your store.

Activate here