Skip to content

Commit f997a9b

Browse files
author
markzegarelli
authored
Merge pull request #2223 from segmentio/DOC-385_FB-capi-destination
DOC-385 FB CAPI Actions
2 parents a3c7d1f + 1885732 commit f997a9b

File tree

3 files changed

+134
-0
lines changed

3 files changed

+134
-0
lines changed
Loading
Loading
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: Facebook Conversions API (Actions)
3+
hidden: true
4+
hide-boilerplate: true
5+
hide-dossier: true
6+
---
7+
8+
Facebook Conversions API (Actions) enables advertisers to send events from their servers directly to Facebook. Server-side events link to Facebook Pixel events, and process like browser pixel events. This means that serve-side events are used in measurement, reporting, and optimization, just like browser pixel events.
9+
10+
> info ""
11+
> This document is about a feature which is in beta. This means that the Facebook Conversions API (Actions) destination is in active development, and some functionality may change before it becomes generally available.
12+
13+
> success ""
14+
> **Good to know**: This page is about the [Actions-framework](/docs/connections/destinations/actions/) Customer.io Segment destination. There's also a page about the [non-Actions Facebook Conversions API destination](/docs/connections/destinations/catalog/facebook-pixel-server-side/). Both of these destinations receives data _from_ Segment.
15+
16+
## Benefits of Facebook Conversions API (Actions) vs Facebook Conversions API Classic
17+
18+
Segment’s Facebook Conversions API (Actions) destination provides the following benefits over the classic Facebook Conversions API destination:
19+
- **Fewer settings**. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
20+
- **Clearer mapping of data**. Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to Facebook Conversions API.
21+
- **Support for page calls**. Page calls can be sent to Facebook as a standard Page View.
22+
- **Support for identify calls**. Identify calls can be sent to Facebook as a standard or custom event.
23+
- **Support for multi-product arrays**. Product data nested within arrays, like the `products` array in the [Order Completed](/docs/connections/spec/ecommerce/v2/#order-completed) event, can be sent to Facebook.
24+
- **Data normalization**. Data is normalized before it is hashed to ensure the hashed value matches Facebook Pixel (browser).
25+
26+
## Getting started
27+
28+
Set up your Pixel to work with the Facebook Conversions API (Actions) destination. You can use an existing Facebook Pixel that you already have set up, or create a new one.
29+
30+
31+
### Option 1: Create a new pixel
32+
33+
1. Go to the [Facebook Business Events Manager](https://www.facebook.com/events_manager/){:target="_blank"} and click **Connect Data Sources**.
34+
2. Choose Web, App, or Offline and then click **Get Started**.
35+
3. Select “Conversions API” and then click **Connect**.
36+
4. Choose “Segment” from the list of partners.
37+
5. Enable the setting to “Authorize Segment Connection” and then click **Continue**.
38+
39+
### Option 2: Configure an existing pixel
40+
41+
1. Go to the Pixel Settings in [Facebook Business Events Manager](https://www.facebook.com/events_manager/){:target="_blank"}
42+
2. Scroll down to the “Set up through a partner integration section” and click **Choose Partner**.
43+
3. Choose “Segment” from the list of partners.
44+
4. Enable the setting to “Authorize Segment Connection” and then click **Continue**.
45+
46+
### Set up in Segment
47+
48+
The Facebook Conversions API (Actions) destination is in Private Beta, and does not appear in the Destinations Catalog.
49+
50+
1. To access the destination, navigate to this URL: `https://app.segment.com/<workspace_slug>/destinations/catalog/actions-facebook-conversions-api`. Replace `<workspace_slug>` with your workspace slug.
51+
2. Click **Configure Facebook Conversions API (Actions)** in the top-right corner of the screen.
52+
3. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)
53+
4. Click **Configure Actions** and follow the set up steps to** Create Destination**.
54+
5. On the Settings tab, enter in your Pixel ID and click **Save**.
55+
6. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customizing-mappings).
56+
57+
## Configuration options
58+
59+
60+
The Segment Facebook Conversions API destination gives you several ways to implement your conversion tracking. You can use it with [Facebook Pixel](/docs/connections/destinations/catalog/facebook-pixel/), or as a stand-alone alternative. You can read more about implementation options below and in [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/guides/end-to-end-implementation#pick-your-integration-type){:target="_blank"}.
61+
62+
63+
### Send events from both the browser and the server
64+
65+
This approach provides a redundancy that ensures maximum signal reliability. Events that previously could have been lost (for several different reasons) when sent from the browser to Facebook Pixel, are also captured using the Facebook Conversions API. You can use this if you do not want to miss any events coming from the browser.
66+
67+
#### Match rate considerations
68+
69+
For this option to work best, pass the same External ID from the browser and the server. To do this, go to your Facebook Pixel destination settings in Segment and enable the **Enable Advanced Matching** setting. Next, enable the **Use User ID or Anonymous ID as External ID** setting, or choose a custom trait for External ID using the **Advanced Match Trait Key for External ID** setting.
70+
71+
With the Facebook Conversions API (Actions) destination, you can choose any field in your event to map to External ID. By default, Segment uses the userId (or anonymousId if userId is not present) to set the External ID, but you can change this in the User Data object mapping of your Action.
72+
73+
![the coalesce function](images/image1.png)
74+
75+
You can send additional User Data to increase the match rate for events from a server source. Collect other fields from the browser, like User Agent, IP Address, and [Facebook's cookie parameters (fbp, fbc)](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc){:target="_blank"}, pass them to the server, and map them in the User Data object.
76+
77+
![the user data object](images/image2.png)
78+
79+
#### Deduplication considerations
80+
81+
A redundant setup requires deduplication to ensure browser events that are sent to Facebook Pixel and Facebook Conversions API are not duplicated. Facebook can deduplicate identical events sent through the Pixel and the Conversions API in two ways:
82+
- [Event ID and Event Name](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#event-id-and-event-name--recommended-){:target="_blank"}
83+
- [FBP or External ID](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events/#fbp-or-external-id){:target="_blank"}
84+
85+
Segment’s Facebook Conversions API (Actions) destination allows you to map your data to these four fields, to support either deduplication method. Please note that Segment’s Facebook Pixel destination will set `messageId` as the `eventId`. See Facebook's [Handling Duplicate Pixel and Conversions API Events](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events){:target="_blank"} for more information.
86+
87+
### Send some events from the browser and others from the server
88+
89+
If you want to separate events completed on a user’s browser from events completed outside the browser, such as a server-based payment system, you can send some events to Facebook Pixel and other events to Facebook Conversions API. Sensitive information is best kept out of browsers, so any data you don’t want exposed to users should only be sent using a server source. You can also set up the Conversions API to measure customer actions that are deeper in your marketing funnel. Seeing these deeper funnel events means you can more accurately measure how your ads are helping you reach your business goals.
90+
91+
#### Match rate considerations
92+
93+
For this option to work best, the same External ID needs to be passed from the browser and the server. To achieve this, go to your Facebook Pixel destination settings in Segment and enable the **Enable Advanced Matching** setting. Next, enable the **Use User ID or Anonymous ID as External ID** setting, or choose a custom trait for External ID using the **Advanced Match Trait Key for External ID** setting.
94+
95+
With the Facebook Conversions API (Actions) destination, you can choose any field in your event to map to External ID. By default, Segment uses the userId (or anonymousId if userId is not present) to set the External ID, but you can change this in the User Data object mapping of your Action.
96+
97+
#### Deduplication considerations
98+
99+
If you choose this option, each source sends different events, and deduplication is not necessary.
100+
101+
### Send events from the server
102+
103+
Use this approach if you don’t want to track users from the browser with Facebook Pixel. By default, Facebook Pixel collects cookie data, as well as browser data such as the IP Address and the User Agent, some of which you might not want to collect. By sending from a Segment server source to Facebook’s Conversions API, you can control which identifiers you pass to Facebook.
104+
105+
106+
#### Match rate considerations
107+
108+
If you use Facebook Conversions API as a stand-alone without certain data fields collected from the browser, the match rate might not be as high as if you included them. You can increase the match rate for events from a server source by including User Data, such as Zip Code, Country and State.
109+
110+
You can send additional User Data to increase the match rate for events from a server source. Collect other fields from the browser, like User Agent, IP Address, and [Facebook's cookie parameters (fbp, fbc)](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc){:target="_blank"}, pass them to the server, and map them in the User Data object.
111+
112+
#### Deduplication considerations
113+
114+
If you choose this option, each source sends different events, and deduplication is not necessary.
115+
116+
## Available Facebook Conversions API actions
117+
118+
Combine the supported [triggers](/docs/connections/destinations/actions/#components-of-a-destination-action) with the following Facebook Conversions API-supported actions:
119+
120+
* Page View
121+
* Search
122+
* View Content
123+
* Add to Cart
124+
* Initiate Checkout
125+
* Purchase
126+
* Custom Event
127+
128+
## Verify Events in Facebook
129+
130+
After you start sending events, you should start seeing them in twenty minutes. You can confirm that Facebook received them:
131+
132+
1. Go to the Events Manager.
133+
2. Click on the corresponding pixel.
134+
3. In the Overview tab, look for events where the “Connection Method” is Server.

0 commit comments

Comments
 (0)