Facebook Conversion API

Track your Facebook Ads performance with Facebook Conversions API

In addition to using Facebook Pixels, you can now measure ad performance with Facebook Conversions API!

With the iOS14 updates, it has become more difficult to track ad performance through pixels, however, with the Facebook Conversions API you’ll be able to easily continue to track your ads.

Let’s walk through setting up your Facebook Conversion API!

You will integrate with Facebook using the Integration Engine. There will be more information on this further down the article. 

To configure the integration you will need:

Your Facebook Pixel ID

Generate a Facebook Conversion API Access token

1. Copy Facebook Pixel ID

To copy your Pixel ID, go to Facebook Events Manager. In an existing Facebook Pixel, go to Settings > Pixel ID. Clicking the Pixel ID will copy it to your clipboard.

For more information on creating a Facebook Pixel check out our support article here: Facebook Pixels and Custom Conversions

2. Generate a Facebook Conversion API Access token

To generate your API Access Token that is also necessary to complete the Facebook Integration, go to Facebook Events Manager. In an existing Facebook Pixel, go to Settings and scroll down to “Conversions API”. Clicking “Generate access token” will expose a one-time access token for the API.

3. Integrate with Facebook
Now that you have gathered your Facebook Pixel ID and API Access token you can proceed to integrating SamCart with Facebook! To do so, navigate to the Integrations tab inside your General Marketplace Settings and click on the New Integration button.
In the Integration Popup you will see the option to select Facebook in the dropdown:
After selecting Facebook click the Next Step button. On the next page in the Integration Popup you’ll then add your Facebook Pixel ID and API Access token:

After entering in the necessary information click on Save Integration to finish connecting with Facebook!

4. Setting Up the Integration Trigger
The last step in setting up your Facebook Conversions API is to set up your integration trigger. To do so, navigate to the Global Rules tab in your Integrations screen and click on New Rule:

The only integration trigger available with Facebook is Product Purchased. In the New Rule popup you’ll want to select eCommerce and Product Purchased as follows:

On the next page of the integration rule pop up, in the Integration dropdown select Facebook and in the Action dropdown select Track Conversion Event:

You have now successfully set up your Facebook Conversions API!

The recommended implementation for the “Product Purchased” trigger is to implement it globally so whenever a product is purchased (primary product, Order Bump, Upsell) a unique conversion event is sent to Facebook.

Facebook recommends using both to ensure the highest level of accuracy! To prevent tracking duplicate events from Conversion API and Pixel you will need to update your Conversion Event script to include the ##event_id## macro.

For example, for static events, you can use the following script: 

 fbq('track', 'Purchase', {
   value: 30.00,
   currency: 'USD'
}, {
   eventID:  '##event_id##'

However, it is not required to use a pixel in addition to the Conversion API.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.