Skip to content

Commit 4839bf3

Browse files
author
Irina
committed
docs for new LDU feature
1 parent aa0cd13 commit 4839bf3

File tree

6 files changed

+170
-1
lines changed

6 files changed

+170
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
In July 2020, Facebook released [Limited Data Use feature](https://developers.facebook.com/docs/marketing-apis/data-processing-options) to help businesses comply with the California Consumer Privacy Act (CCPA). This feature limits the way user data is stored and processed for all California residents who opt out of the sale of their data. You can send Limited Data Use data processing parameters to Facebook on each event so that Facebook can appropriately apply the user’s data choice. Segment recommends that you first familiarize yourself on this feature and the [Data Processing Options Facebook accepts](https://developers.facebook.com/docs/marketing-apis/data-processing-options).
2+
3+
This destination supports the following parameters:
4+
5+
* **Data Processing Options**
6+
* **Data Processing Options Country**
7+
* **Data Processing Options State**
8+
9+
You can enable the feature using the **Use Limited Data Use** destination setting and control it using Data Processing Initialization Parameters.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### Data Processing Destination Setting
2+
3+
You can change the **Use Limited Data Use** destination setting to enable or disable Limited Data Use. This must be enabled (set to “on”) if you want to send data processing parameters as part of the the Limited Data Use feature.
4+
5+
### Data Processing Initialization Parameters
6+
7+
The Data Processing parameters you set are the Data Processing Options Segment uses when sending data to Facebook. By default, Segment uses the following Data Processing Parameters:
8+
9+
| **Data Processing Parameter** | **Default Value** | **What it means** |
10+
| ----------------------------------- | ----------------- | ----------------------------------------------- |
11+
| **Data Processing Options** | `["LDU"]` | Use Facebook’s Limited Data Use processing |
12+
| **Data Processing Options Country** | `0` | Use Facebook’s geolocation to determine country |
13+
| **Data Processing Options State** | `0` | Use Facebook’s geolocation to determine state |

src/connections/destinations/catalog/facebook-app-events/index.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,67 @@ The most important events that can help advertisers improve campaign ROI are the
155155

156156
In addition, there are special requirements for dynamic ads. These events are marked with "m" for dynamic ads for mobile, and "t" for dynamic ads for travel within Segment's Facebook App Events settings page.
157157

158+
## Limited Data Use
159+
160+
{% include content/facebook-ldu-intro.md %}
161+
162+
> info ""
163+
> The **Use Limited Data Use** destination setting is disabled by default for all Facebook destinations except for Facebook Pixel. This must be enabled manually from the destination settings if you're using other Facebook destinations.
164+
165+
{% include content/facebook-ldu-params.md %}
166+
167+
Facebook uses the `context.ip` to determine the geolocation of the event.
168+
169+
You can manually change the Data Processing parameters by adding settings to the `integrations` object.
170+
171+
#### Server-side library
172+
173+
The example below shows how you might set custom Data Processing parameters for a Segment server library.
174+
175+
```javascript
176+
// node library example
177+
178+
analytics.track({
179+
event: 'Membership Upgraded',
180+
userId: '97234974',
181+
integrations: {
182+
"Facebook App Events": {
183+
"dataProcessingOptions": [[], 1,1000]
184+
}
185+
}
186+
})
187+
```
188+
189+
#### iOS Device Mode
190+
191+
When you use Segment’s mobile libraries, you must set the Data Processing Options when you declare the destination in your app delegate’s instance. The example below shows how you might set custom Data Processing parameters in an iOS project.
192+
193+
```objc
194+
// Add the bundle FB integration SDK
195+
// Set data processing values.
196+
SEGFacebookAppEventsIntegrationFactory *fb = [SEGFacebookAppEventsIntegrationFactory instance];
197+
[fb setDataProcessingOptions:@[ @"LDU" ] forCountry:1 forState: 1000];
198+
[config use:fb];
199+
```
200+
201+
#### Android and iOS Cloud Mode
202+
203+
To send the Data Processing Parameters in cloud mode on iOS or Android, you can set them in the integrations object. The example below shows how you might set custom Data Processing parameters in Android.
204+
205+
```java
206+
Object[] dataProcessingOptions = new Object[3]
207+
dataProcessingOptions[0] = {'LDU'} // options
208+
dataProcessOptions[1] = 1 // country
209+
dataProcessingOptions[2] = 1000 // state
210+
211+
Analytics.with(context).track(
212+
"Purchased Item",
213+
new Properties(),
214+
new Options().setIntegrationOptions(
215+
"Facebook App Events", new ImmutableMap.Builder<String, Object>().put("dateProcessingOptions", dataProcessingOptions).build());
216+
)
217+
```
218+
158219
## Other Features
159220

160221
### Facebook Login and Facebook Dialogs

src/connections/destinations/catalog/facebook-offline-conversions/index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,39 @@ analytics.track({
277277
We will use SHA256 to hash all `match_keys` that include personally identifiable data in compliance with Facebook's privacy requirements.
278278

279279
Keep in mind that Facebook's furthest possible attribution window is 28 days. It is recommended that you send your server side `track` conversions within 62 days of the offline conversion occuring.
280+
281+
## Limited Data Use
282+
283+
{% include content/facebook-ldu-intro.md %}
284+
285+
> info ""
286+
> The **Use Limited Data Use** destination setting is disabled by default for all Facebook destinations except for Facebook Pixel. This must be enabled manually from the destination settings if you're using other Facebook destinations.
287+
288+
### Data Processing Destination Setting
289+
290+
You can change the **Use Limited Data Use** destination setting to enable or disable Limited Data Use. This must be enabled (set to “on”) if you want to send data processing parameters as part of the the Limited Data Use feature.
291+
292+
### Data Processing Initialization Parameters
293+
294+
The Data Processing parameters you set are the Data Processing Options Segment uses when sending data to Facebook.
295+
296+
The Facebook API does not accept an IP address field to determine the geolocation of a user. Instead, you would need to set the specific user geography options (**Data Processing Options Country** and **Data Processing Options State**) in the `integrations` object.
297+
298+
> warning ""
299+
> If the **Use Limited Data Use** destination setting is enabled, but you do *not* pass the Data Processing parameters in the `integrations` object, Segment sends an empty data processing object which disables LDU for this event.
300+
301+
The example below shows how you might set custom Data Processing parameters for a Segment server library.
302+
303+
```javascript
304+
// node.js library example
305+
306+
analytics.track({
307+
event: 'Membership Upgraded',
308+
userId: '97234974',
309+
integrations: {
310+
"Facebook Offline Conversions": {
311+
"dataProcessingOptions": [[], 1,1000]
312+
}
313+
}
314+
})
315+
```

src/connections/destinations/catalog/facebook-pixel-server-side/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,33 @@ uses the value of the "Value Field Identifier" setting to determine which
145145
property to use for the "value" field. This field defaults to
146146
`price`.
147147

148+
## Limited Data Use
149+
150+
{% include content/facebook-ldu-intro.md %}
151+
152+
> info ""
153+
> The **Use Limited Data Use** destination setting is disabled by default for all Facebook destinations except for Facebook Pixel. This must be enabled manually from the destination settings if you're using other Facebook destinations.
154+
155+
{% include content/facebook-ldu-params.md %}
156+
157+
Facebook uses the `context.ip` to determine the geolocation if it exists on the event.
158+
159+
You can manually change the Data Processing parameters by adding settings to the `integrations` object. The example below shows how you might set custom Data Processing parameters in Node.
160+
161+
```javascript
162+
// node.js library example
163+
164+
analytics.track({
165+
event: 'Membership Upgraded',
166+
userId: '97234974',
167+
integrations: {
168+
"Facebook Pixel Server-Side": {
169+
"dataProcessingOptions": [[], 1,1000]
170+
}
171+
}
172+
})
173+
```
174+
148175
## Verify Events in Facebook
149176

150177
After you start sending events, you should start seeing them in twenty

src/connections/destinations/catalog/facebook-pixel/index.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ analytics.identify('ze8rt1u89', {
5656
name: 'Zaphod Kim',
5757
gender: 'Male',
5858
59-
phone: '1-401-826-4421',
59+
phone: '1-401-555-4421',
6060
address: {
6161
city: 'San Francisco',
6262
state: 'Ca',
@@ -163,6 +163,29 @@ If you follow Segment's [spec](/docs/connections/spec/identify/#traits), these w
163163

164164
Facebook also accepts an External ID. This can be any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. In order to send an `external_id` to Facebook you can indicate which user trait you would like Segment to map to `external_id` using the **Client-Side Only: Advanced Match Trait Key for External ID** setting.
165165

166+
## Limited Data Use
167+
168+
{% include content/facebook-ldu-intro.md %}
169+
170+
> info ""
171+
> The **Use Limited Data Use** destination setting is disabled by default for all Facebook destinations except for Facebook Pixel. This must be enabled manually from the destination settings if you're using other Facebook destinations.
172+
173+
{% include content/facebook-ldu-params.md %}
174+
175+
Facebook uses the `context.ip` to determine the geolocation of the event.
176+
177+
You can manually change the Data Processing parameters by adding settings to the `integrations` object. For Facebook Pixel, you must store these settings in the [Load object](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#load-options) so that Segment can set them *before* it calls `init`. The example below shows how you might set custom Data Processing parameters in Analytics.js.
178+
179+
```javascript
180+
analytics.load("replace_with_your_write_key", {
181+
integrations: {
182+
'Facebook Pixel': {
183+
dataProcessingOptions: [['LDU'], 1, 1000]
184+
}
185+
}
186+
});
187+
```
188+
166189
## Settings
167190

168191
### Map Categories to FB Content Types

0 commit comments

Comments
 (0)