Facebook Conversions API Integration


Article author
Ensighten Support Team
  • | minute read

Overview

Ensighten has partnered with Facebook to develop a Facebook Conversions API (CAPI) solution in-line with Facebook’s recommendation to deploy the Facebook Conversions API tags server-side to achieve greater accuracy with conversion tracking and targeting.

This guide will serve as a step-by-step implementation guide on how to deploy both the Facebook pixel and Facebook Conversions API tags using Ensighten. Facebook recommends deploying both the Facebook pixel, client-side and the Facebook Conversions API, server-side for maximum accuracy and tracking due to possible browser and device tracking restrictions.

Conversion Flow

The flow currently looks like this: Facebook Pixel fires client-side which generates an eventID. If third party cookies are allowed on the user’s browser, the conversion is sent from the client-side as this currently carries more complete data. If the user’s browser is not allowing third-party cookies, that eventID is collected and sent to the server-side Facebook API for use in sending the conversion using the available data.

The flow looks like this Facebook Pixel fires generating an eventID which is collected and sent to the server-side Facebook API.

  • Facebook Pixel with EventID → Data Collector → Facebook API

Facebook Business Manager Setup

Generate Facebook Conversions API Access Token

First, the pixel needs to be granted approval to use the Face Conversions API. Use your Facebook Business Manager dashboard to create an access token to use for the Facebook Pixel. While access tokens can be assigned to individual users within the Facebook Business Manager, Facebook recommends using the System Users to generate the access token as the token never expires and is tied to the business rather than an individual who might leave the business, which will then invalidate the token.

  • Create a System User

    1. From the Facebook Business Manager, navigate to Business Settings.
    2. Under the Users section on the left, click System Users, then select Conversions API System User.
    3. Click Add Asset.
    4. In the Select asset type column, select Pixels and find your pixel.
    5. Toggle ON Full Control next to Manage Pixel and click Save Changes.
  • Create an access token for the Facebook pixel

    1. Under Data Sources on the left, select Pixels and find your pixel.
    2. On the right, click Open in Events Manager.
    3. Confirm you have the Pixel ID highlighted in the menu and click Settings.
    4. Scroll down to the Conversions API section under Set up Manually, click the Generate access token link.
    5. Copy the generated access token and save it for use in later in the guide.

These steps can change at any point due to any changes made to the Facebook Business Manager dashboard.

Ensighten Setup

Configure Facebook Pixel Tag Deployments

Now that your Facebook pixel has enabled the Conversions API and the access token has been created, deployments Ensighten side need to be configured.

  • For existing deployments

    1. Navigate to any existing Facebook Pixel Base Tag and/or Event Tag deployment(s) and click Edit.
    2. On configuration page, select the Enable Conversions API Integration checkbox.
    3.  SST Domain: Enter your Ensighten SST first-party domain.
    4. Click Save & Commit.
    5. Publish the space.
  • If there are no existing deployments

    1. Create new deployments from the Apps section by searching for Facebook Pixel (FCA) and click Configure.
    2. Select the Base Tag and/or Event Tag configuration option.
      1. At least one Facebook FCA Base Tag deployment is required. 
    3. Name: Enter a name for the tag(s).
    4. Pixel ID: Enter your Facebook Pixel ID.
    5. Configure the tag options to fit your specifications including any other event information.
    6. Ensure the Enable Conversions API Integration checkbox is selected.
    7.  SST Domain: Enter your Ensighten SST first-party domain.
    8. Choose a space: Select the space for the deployment. 
    9. Choose one or more conditions: Add any necessary conditions or Ensighten Events that should execute this deployment. 
    10. Click Save & Commit.
    11. Publish the space

Configure Facebook Conversions API Deployment

Facebook has a few data requirements that must be included in an API request which are outlined below. For complete documentation, visit Facebook Conversion API. The more data sent to Facebook's Conversion API, the better the match rate will be.

  • Add a New Tag

    1. Navigate to the Apps section, search for Facebook Conversion API (SST) and click Configure.
    2. Name: Enter a name for the tag. We recommend something similar to Facebook Conversions API.
    3. Access Token: Enter the token created earlier. 
    4. Ensure the Enable Conversions API Integration checkbox is selected.
    5. Pixel ID: Enter your Facebook Pixel ID.
  • Event Parameters

    1. Event Name
    2. Event ID
    3. Action Source URL
    4. Enable Limited Data Use (LDU)
      1. Processing Options Country
      2. Processing Options State
    5. Ad Optimization Opt-out
  • Customer Information Parameters

    These parameters are a set of identifiers Facebook can use for targeted attribution. You must provide at least one of the following parameters in your request.

    Ensighten automatically configures the following fields: IP address, User Agent, Page URL, Facebook Click ID, and Facebook Browser ID. They can be altered by altering the settings within the Advanced Options of the Facebook Conversions API App.

    1. External ID (recommended)
    2. Client IP Address (Required)
    3. Client User Agent (Required)
    4. Browser ID (Facebook cookie, recommended)
  • Data Parameters:

    1. Value
    2. Currency
    3. Content Name
    4. Content Category
    5. Content ID
    6. Contents
    7. Content Type
    8. Order ID
    9. Predicted Lifetime Value
  • Custom Data Parameters

    1. Custom Parameters
    2. Redact visitor IP address
  • Advanced Options

    1. API Version
    2. IP address
    3. User Agent
    4. Page URL
    5. Facebook Click ID
    6. Facebook Browser ID

Was this article helpful?

0 out of 0 found this helpful