You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/appsflyer/index.md
+86-30Lines changed: 86 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -62,43 +62,15 @@ To prevent this, you can enable the new **Fallback to send IDFV when advertising
62
62
63
63
{% include content/react2-dest.md %}
64
64
65
-
###Server
65
+
## Server
66
66
67
67
AppsFlyer offers an **augmentative** server-side [HTTP API](https://support.appsflyer.com/hc/en-us/articles/207034486-Server-to-Server-In-App-Events-API-HTTP-API-){:target="_blank"} intended for use along side the AppsFlyer mobile SDK. Use the cloud-mode destination _with_ the mobile SDK to link out-of-app events (such as website or offline purchases) with attributed users and devices.
68
68
69
69
**Important**: The cloud-mode destination is not meant to replace the device-mode destination, and you should not use the cloud-mode destination by itself. AppsFlyer requires that you bundle the mobile SDK to correctly attribute user actions. Remember that if you pass in an `appsFlyerId` on cloud-mode calls, you cannot prevent events from sending to AppsFlyer from the Segment app.
70
70
71
71
If you want to use AppsFlyer server-side only, contact your AppsFlyer representative, as this is an Enterprise Customer Feature.
72
72
73
-
## Identify
74
-
75
-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example iOS call would look like:
When you call `.identify()`, Segment uses AppsFlyer's `setCustomerUserID` to send the `userId` that was passed in.
83
-
84
-
**Note:**`identify` calls are not supported using AppsFlyer's HTTP API at the moment. You can only send `.identify` calls if you have the AppsFlyer SDK bundled.
85
-
86
-
## Track
87
-
88
-
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example iOS call would look like:
properties:@{ @"title": @"How to Create a Tracking Plan", @"course": @"Intro to Analytics" }];
93
-
```
94
-
95
-
When you call `track`, Segment translates it automatically and sends the event to AppsFlyer.
96
-
97
-
Segment includes all the event properties as callback parameters on the AppsFlyer event, and automatically translate `properties.revenue` to the appropriate AppsFlyer purchase event properties based on the spec'd properties.
98
-
99
-
Finally, Segment uses AppsFlyer's `transactionId` deduplication when you send an `orderId` (see the [e-commerce spec](/docs/connections/spec/ecommerce/v2/)).
100
-
101
-
### Server
73
+
### Configuring Server-side Delivery
102
74
103
75
If you'd like to attribute offline events with a certain user or device, the server-side destination may be employed.
104
76
@@ -158,6 +130,90 @@ When transmitting data serverside to Appsflyer, you have the option to enhance s
158
130
159
131
To activate this feature, simply input your S2S token in the destination settings and toggle the "Use API v3" switch to the enabled position.
160
132
133
+
### Send User Consent Preferences Server-side
134
+
135
+
To transmit user consent data server-side, incorporate the consent preferences into the `integrations.AppsFlyer.consent_data` object. This can be done in either TCF or manual format, as outlined in [the AppsFlyer Send Event documentation](https://dev.appsflyer.com/hc/reference/s2s-events-api3-post){:target="_blank”}.
136
+
137
+
```js
138
+
// node.js library example with tcf
139
+
analytics.track({
140
+
event:'Membership Upgraded',
141
+
userId:'97234974',
142
+
context: {
143
+
device: {
144
+
type:'ios',
145
+
advertisingId:'159358'
146
+
}
147
+
},
148
+
integrations: {
149
+
AppsFlyer: {
150
+
appsFlyerId:'1415211453000-6513894'
151
+
},
152
+
consent_data: {
153
+
tcf: {
154
+
tcstring:"string",
155
+
cmp_sdk_version:1,
156
+
cmp_sdk_id:1,
157
+
gdpr_applies:0,
158
+
policy_version:1
159
+
}
160
+
}
161
+
}
162
+
});
163
+
164
+
// node.js library example with manual consent
165
+
analytics.track({
166
+
event:'Membership Upgraded',
167
+
userId:'97234974',
168
+
context: {
169
+
device: {
170
+
type:'ios',
171
+
advertisingId:'159358'
172
+
}
173
+
},
174
+
integrations: {
175
+
AppsFlyer: {
176
+
appsFlyerId:'1415211453000-6513894'
177
+
},
178
+
consent_data: {
179
+
manual: {
180
+
ad_personalization_enabled:'true',
181
+
ad_user_data_enabled:'true',
182
+
gdpr_applies:'true'
183
+
}
184
+
}
185
+
}
186
+
});
187
+
```
188
+
189
+
## Identify
190
+
191
+
If you're not familiar with the Segment Spec, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example iOS call would look like:
When you call Identify, Segment uses AppsFlyer's `setCustomerUserID` to send the `userId` that was passed in.
199
+
200
+
**Note:** Identify calls are not supported using AppsFlyer's HTTP API at the moment. You can only send `.identify` calls if you have the AppsFlyer SDK bundled.
201
+
202
+
## Track
203
+
204
+
If you're not familiar with the Segment Spec, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example iOS call would look like:
properties:@{ @"title": @"How to Create a Tracking Plan", @"course": @"Intro to Analytics" }];
209
+
```
210
+
211
+
When you call Track, Segment translates it automatically and sends the event to AppsFlyer.
212
+
213
+
Segment includes all the event properties as callback parameters on the AppsFlyer event, and automatically translates `properties.revenue` to the appropriate AppsFlyer purchase event properties based on the spec'd properties.
214
+
215
+
Segment uses AppsFlyer's `transactionId` deduplication when you send an `orderId` (see Segment's [e-commerce spec](/docs/connections/spec/ecommerce/v2/) for more details).
0 commit comments