How it works: Shopify to Facebook Conversions API (CAPI)

Updated on 2023-11-30

Littledata’s Shopify to Facebook Conversions API connection uses a combination of client-side and server-side tracking to increase event match quality and Facebook Pixel attribution. The connection can be set up from the Connections tab in the Littledata app.

The Conversions API (CAPI) lets Facebook Ads users share customer actions from the servers directly to Facebook. CAPI works alongside the Facebook Pixel to help you improve the performance, measurement and data collection of your Facebook campaigns, including Facebook Ads and Instagram Ads. FB CAPI is not a replacement for Facebook Pixel -- instead, it is an enhancement that enables deeper, first-party data to help you understand performance in more detail and run more effective ads. This works for both Facebook Ads and Instagram Ads.

Littledata makes this data more accurate and reliable, so that your campaigns reach the right shoppers at the right time. Benefits include:

  • Automatically improve Event Match Quality Score
  • Run dynamic product ads based on accurate shopping data
  • Make revenue data in Shopify match revenue data in Facebook

You can also connect BigCommerce to Conversions API to get the same benefits for your BigCommerce store.

What you can track

tip:

New to Facebook Conversions API? Learn more about how to run dynamic Facebook ads with Facebook CAPI.

Here's what you can track with Littledata's Conversions API integration for Shopify and Shopify Plus. For a complete list of events tracked, see Littledata's Facebook CAPI Tracking Schema.

All the events below are tracked by default. You can turn some events off by contacting customer support.

Client-side events

Event nameDescription
ViewContentA visit to a web page such as a product page or landing page. View Content tells you if someone visits a web page's URL, but not what they do or see on that web page.

Server-side events

Event nameDescription
Add to cartThe addition of an item to a shopping cart or basket. For example, clicking an Add to Cart button.
InitiateCheckoutThe start of a checkout process. For example, clicking the Checkout button.
AddPaymentInfoThe addition of customer payment information during a checkout process. For example, a customer clicks on a button to save their billing information.
PurchaseThe completion of a one time purchase or first recurring purchase, usually signified by receiving order or purchase confirmation, or a transaction receipt. For example, landing on a Thank You or confirmation page (excluding Point of Sale orders).
Post Purchase UpsellThe completion of an upsell purchase, that will contain only the newly added products.
Recurring PurchaseThe completion of an automatic recurring purchase, such as a recurring order from Recharge subscriptions.

Note: Remove from cart, view item list and refund events are not officially supported by Meta's Facebook Conversions API. This is a limitation on Facebook's side, not Littledata's.

Lifetime Value

For each Purchase and Recurring Purchase event, Littledata sends a parameter named predicted_ltv. This parameter contains the lifetime value of the user. We pull this information directly from Shopify and then make sure that it syncs correctly with Facebook.

Facebook event match quality score

Event Match Quality is a score that indicates how effective your server event's customer information parameters may be at matching it to a Facebook account. Event Match Quality is scored from 1 to 10. Having a high score can help decrease your cost per action.

Using the combination of client-side and server-side tracking, we are able to send enough data to Facebook for the matching between the events and the Facebook user account in an effective way. If all the necessary parameters are provided, you can obtain an event match quality score of above 8.5.

However, it's important to note that event quality scores fluctuate quite often. The score is calculated on a daily basis and Facebook analyses data quality over the last 24 hours. Also note that the score might not be immediately available if you're just getting started with Facebook CAPI. We recommend installing Littledata's CAPI connection and then waiting a week to see the difference in quality.

note:

If a user has a different name, email or address during their interaction with your website, Facebook won’t be able to properly match this information to a Facebook account. This will result in a lower event match score and will affect ad performance and delivery.

How does Littledata's CAPI integration improve the event match quality score?

Littledata is sending all the parameters needed by Facebook to perfectly match the events. Our Conversions API integration follows Facebook's hashing requirements, ensuring that all parameters are received and processed to increase the event match quality.

The most important parameters are the user parameters. If an event does not have at least one user parameter, Facebook will not accept said event.

note:

Here are all the customer parameters that Facebook uses.

Littledata sends all the parameters with the exception of:

  • external_id (any unique ID from the advertiser)
  • fb_login_id (the ID issued by Facebook when a person first logs into an instance of an app)
  • lead_id (the ID associated with a lead generated by Facebook’s Lead Ads)
  • ge (gender parameter)
  • db (date of birth)

Fbp and fbc parameters

The most important parameters that we send are fbp and fbc cookies, which are the equivalent of the Google client ID. These parameters are vital in the event match quality score. That is why we implemented a way to always have an fbp available. \

In the event that the fbp parameter cannot be retrieved (due to ad blockers), we will automatically generate an fbp and attribute it to the user so that the event match quality will not be impacted.

The fbp and fbc parameters are passed with server-side events as well to ensure the highest event match quality.

User agent and IP address

User agent and IP address are also essential for a high Event Match Quality Score. They work similar to fbp and fbc cookies but are easier to retrieve from the browser.

User agent and IP address are automatically added to the browser events, but we pass them to the server-side events as well so the event match quality can increase.

Besides fbp, fbc, user agent and IP address, there are other parameters that we send:

  • em - email of the user (hashed)
  • ph - phone number of the user (hashed)
  • fn - first name (hashed)
  • ln - last name (hashed)
  • ct - City (hashed)
  • st - State (hashed)
  • zp - zip code (hashed)
  • country - Country of the user (hashed)
  • subscription_id - sent with a recurring order

All of these parameters are passed from the browser to the server so that the right user is attributed to the event.

How it works

How it works Shopify Facebook Conversions API

Client-side (browser) tracking

Facebook Pixel is a client-side tracking method that works directly in the browser. It helps brands measure, optimise and build audiences for ad campaigns in Facebook Ads and Instagram Ads.

When you install Facebook Pixel, a snippet of JavaScript code is added that allows tracking visitor activity on your website. Tracked conversions appear in the Ads Manager where they can be used to measure the effectiveness of the ads, define custom audiences for ad targeting or for dynamic ad campaigns, and to analyse the website's conversion funnels.

When the Facebook pixel is installed on a website and uses third-party cookies, the pixel automatically saves a unique identifier to an _fbp cookie for the website domain if one does not already exist.

When a user clicks on a Facebook ad, it includes the fbclid query parameter. If they land on the site that uses a third-party cookie with enabled browser tracking, then the fbclid query parameter is saved inside _fbc cookie. It’s important to understand that not all events will have _fbc parameter. Traffic from organic searches, Google Ads or email campaigns won’t contain _fbc.

Server-side tracking

Client-side tracking is useful, but it is only part of the story. To get accurate data, you need server-side tracking that captures everything that happens in your online store, including checkout funnel activity and purchases. Littledata's FB CAPI connection for Shopify does this automatically.

Server-side tracking is a more accurate way to track actions and attribute them to Facebook campaigns. In situations where the Facebook Pixel might be blocked by privacy controls (ad blockers, ITP and iOS 14/15/16 restrictions), Conversions API can still track conversions.

Server events are linked to a Facebook Pixel ID and are processed like web events sent via Pixel. This means that server events are used in measurement, reporting and optimisation similar to browser Pixel events.

For a complete list of events, triggers and parameters tracked by Littledata, see our Facebook CAPI Tracking Schema. For more information about Facebook CAPI, you can also check our Facebook CAPI FAQ.