Overview
Ensighten has developed a Conversions API (CAPI) solution in-line with Meta’s recommendation to deploy the 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 Meta Pixel and CAPI tags using Ensighten. Meta recommends deploying both the Meta Pixel (on the client-side) and the CAPI (on the server-side) for maximum accuracy and tracking due to possible browser and device tracking restrictions.
Generate and Store Conversions API Access Token
Within this guide, we will assume a Meta Pixel has already been created within your Business >Manager. If you have not created the Meta Pixel yet, visit https://www.facebook.com/business/help/952192354843755 to view steps to create your Pixel.
Creating an access token for the Meta Pixel
- Login to Business Settings and select your business.
- Under the Data Sources section on the left, click Pixels.
- Select your Pixel and click Open in Events Manager at the top right
- Ensure you have the correct Pixel ID highlighted in the menu on the left, then click on Settings in the right panel.
- Under the Conversions API section and Set up manuallysubsection, click on the Generate access token link
- Copy the generated access toke and save it for the next step in the implementation
Storing the Access Token as an SST Secret
- Login and visit the Data Collection > SST > Secrets page
- Click Create Secret in the top right corner of the page.
- In the NAME field enter meta_access_token. In the VALUE field paste in the value of your access token you copied in the previous step. Finally, click SAVE.
Configure Meta Pixel
Now that your Pixel has enabled the Conversions API feature and you have setup your access token, the Meta Pixel needs to be modified to enable the Conversions API tag.
-
-
Edit your existing Ensighten Meta Pixel tags (if they exist) or create a new one by visit theManage Apps page (https://manage.ensighten.com/apps), search for “Meta (Facebook) Pixel”,and click “Configure” (or simply click here).
-
Within the configuration page, expand the “Conversions API” panel toggle on Enable SST Conversions API Integration.
-
If this is a new Pixel tag, choose your Space and add any necessary Conditions or EnsightenEvents that should execute this Pixel.
- Click Save & Commit.
- Publish the space.
-
* Meta highly recommends sending user data (where possible) such as the user’s email address and/or phone number to improve the event match quality. These options are available in the “User Data” panel shown in the screenshot below.
Configure Server-Side Tagging Library
Next, we need to configure the Server-Side Tagging (SST) Library. You will only need one instance of the SST library for all your SST tags, so if you’ve already configured the tag, you can skip this step.
- Visit the Manage Apps page (https://manage.ensighten.com/apps), search for Server-Side Tagging (SST), and click “Configure” (or simply click here).
- Select Core Libraryas the tag type.
- Enter a tag name such as SST - Library.
- Enter your SST first-party domain and any additional fields if necessary, such as your data layer
- Click the Save & Commit button at the bottom of the page and then publish the tag change.
Configure Conversions API
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.
-
- Visit the Manage Apps page (https://manage.ensighten.com/apps), search for “Meta Conversions API”, and click “Configure” (or simply click here).
- Enter a tag name such as Meta Conversions API.
- Select your Access Token SST Secret in the Access Token field.
- Ensure the Enable Conversions API Integration toggle is selected.
- Click Continue and select your Ensighten Server-Side Tagging Space (likely Server-Side Tagging or “sst)
- Choose the All Pages - Non-blocking (Asynchronous) as your Condition.
- Click Save & Commit and then publish the tag
Ensighten automatically configures the following fields: IP address, User Agent, Page URL, Click ID, and Browser ID. They can be altered by altering the settings within the Advanced Options of the Conversions API App.
** For information on further Conversions API fields, visit the documentation here
https://developers.facebook.com/docs/marketing-api/conversions-api.
*** The more information you send to the Conversions API, the better the match rate will be.