Stape
Search
Try for free

Facebook Conversion API for Bigcommerce

Updated
Jul 9, 2024
Published
Apr 18, 2021

Integrating Facebook CAPI could make a significant difference if you are a BigCommerce merchant looking to improve your advertising campaigns and get better results. Facebook CAPI allows you to send event and user data directly from your server to Facebook, bypassing potential data loss from browser limitations and ad blockers and adjusting to third-party cookie deprecation. This direct connection can help you better understand customer behavior, enhance ad targeting, and increase conversions. 

In this blog post, we will discuss the benefits of Facebook CAPI and provide a step-by-step guide on setting up Facebook CAPI for BigCommerce using the Stape Server GTM app.

How does the Facebook conversion API work with your BigCommerce pixel?

Facebook recommends running browser tracking (Facebook pixel) and server-side tracking (FB CAPI) in parallel. This means you must send identical events from two sources, FB Pixel and CAPI. To prevent overreporting, setting up event deduplication using the eventID method is required. The main idea of deduplication is if an event with the same name and event ID is sent to Facebook within 5 minutes, the server event will be deduplicated, and the web one will remain active. 

However, the Facebook Conversion API can work as a replacement for your standard pixel tracking. Though Facebook does not recommend using only server tracking, it may improve your site’s page speed. 

Facebook conversion API BigCommerce

What events and parameters can you send from your BigCommerce site using Facebook conversion API?

Facebook conversion API can support all types of FB events, including standard and custom. To help Facebook better attribute server events to users’ profiles, it's highly recommended sending user data together with server events. For each server event, Facebook will assign event match quality ranging from 0 to 10, which depends on the number and quality of the user data associated with the event. 

Here’s an example of user parameters and a difference between server and browser events:

Facebook conversion API event match quality

All Facebook events that you send from the server will have an event match quality score. You can get a maximum of 10 points, and the score you get depends on the number of user parameters you send to Facebook. It is required to send at least one customer parameter like email, browser, or IP address. . Facebook also recommends sending _fbp and _fbc parameters

How to set up a Facebook conversion API on your BigCommerce site

2.1. In the General tab are all the settings related to installing the GTM snippet on all pages of your Bigcommerce website.

Stape Server GTM app for BigCommerce

Insert GTM snippet

Here you need to specify your GTM web container ID.

Custom domain

It is extremely important to use your own subdomain for first party cookies to work correctly. If you do not already have a subdomain added to your sGTM container, you can use this guide to add it.

Custom loader

An optional parameter, but its use is highly recommended to increase protection against ad blockers.

Specify here your Stape container identifier. Follow this guide to find Stape container identifier.

Cookie Keeper

You can learn more about Cookie Keeper power-up on this page.

This allows you to minimize the impact of the latest Safari ITP restrictions.

Before activating this feature, make sure you have it enabled in Stape admin, in your container.

2.2. Under the Data Layer tab, you may find checkboxes that enable dataLayer events.

Stape Server GTM app for BigCommerce

You may find the list of events the app will be pushing below. The events will hold product and user information (if it is available at that point of time), so you could easily use this data to report to any advertising and/or analytics platform of your choice.

  • view_collection
  • view_item
  • add_to_cart
  • view_cart
  • remove_from_cart
  • begin_checkout
  • add_payment_info
  • purchase

2.3. Under the Webhooks tab, you may configure the webhooks to be sent to a specified URL for purchase and refund events. With purchase webhook you’ll also receive one of the statuses that is assigned to the order: AWAITING_FULFILLMENT, COMPLETED or AWAITING_PAYMENT.

Stape Server GTM app for BigCommerce

3. Send data to the server Google Tag Manager container. There are two most popular ways to do that:

Configure Facebook CAPI tag inside sGTM

Facebook tags by stape have two behaviors: Inherit from the client and Override. If you select the inherit option, the FB CAPI tag will listen to the event data and try to parse and map all data it can identify to send to the Meta CAPI. If you select override, then you must specify all parameters manually. Below are examples of configuring FB CAPI for each of these tag behaviors. 

‘Inherit’ option:

We will automatically convert your GA4 events into corresponding Facebook standard events. 

1. Add a Facebook Conversion API Tag to your server GTM container by clicking Add to Workspace.

facebook conversion api tag

2. Create a new tag and select the tag type Facebook Conversion API Tag.

Select Inherit from client and add:

facebook conversion api tag configuration

3. Add a trigger. Click triggers →  + in the top right corner →  trigger settings and select a custom trigger →  this trigger will fire on Some Events →  Client Name equals GA4. Click Save.

facebook conversion api tag configuration

'Override' option:

In this case you will need to manually configure each Facebook CAPI tag in server GTM. We will show the add_to_cart event as an example, the configuration of other events are similar. 

1. Extract event_id variable from the sGTM event data. To do so create a new variable with the variable type Event data and add key path event_id (make sure it matches with the event parameter name that you’ve specified in the web GTM container).

facebook conversion api tag configuration

2. Open server GTM container and add FB CAPI tag template from the template gallery.

facebook conversion api tag

3. Create a new tag with the tag type Facebook Conversion API → select override in the Event Name Setup Method and the event type AddToCart.

Add:

facebook conversion api tag configuration

4. Add a trigger. In my case it is a Custom event with the event name add_to_cart and a client name equals GA4. Click Save.

facebook conversion api tag configuration

Conclusion

The great thing about implementing Facebook conversion API into your BigCommerce store is giving Facebook more reliable information about site visitors. If you need any help implementing FB CAPI into your BigCommerce store, let us know what kind of help you need.

Tagged with:Facebookgtm server

Host your GTM server at Staperight now!