Skip to content

DOC 501 AppsFlyer update #2768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/Vocab/Docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
(?:L|l)ookback
(?:P|p)ageviews?\b
(?:P|p)endo
(?:P|p)odfile
(?:P|p)ostgres
(?:R|r)emarketing
(?:U|u)nlinks?\b
Expand All @@ -17,6 +18,7 @@ Adwords
allowlist
Amberflo
Appboy
Appsflyer
blocklist
boolean
Chargebee
Expand Down Expand Up @@ -69,6 +71,7 @@ upsert
US
utm
Vero
Vidora
viewability
WebKit
Wootric
Expand Down
24 changes: 13 additions & 11 deletions src/connections/destinations/catalog/appsflyer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
rewrite: true
title: AppsFlyer Destination
id: 54521fd525e721e32a72ee8f
hide-personas-partial: true
---
[AppsFlyer](https://www.appsflyer.com/) is the world's leading mobile attribution & marketing analytics platform, helping app marketers around the world make better decisions. Our AppsFlyer destination code is open-source. You can browse the code on GitHub for [iOS](https://github.com/AppsFlyerSDK/segment-appsflyer-ios) and [Android](https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration).
[AppsFlyer](https://www.appsflyer.com/){:target="blank"} is the world's leading mobile attribution & marketing analytics platform, helping app marketers around the world make better decisions. The AppsFlyer destination code is open-source. You can browse the code on GitHub for [iOS](https://github.com/AppsFlyerSDK/segment-appsflyer-ios){:target="blank"} and [Android](https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration){:target="blank"}.

Segment's Appsflyer destination code is open source and available on GitHub. You can view these repositories:
- [Android](https://github.com/AppsFlyerSDK/appsflyer-segment-android-plugin){:target="_blank"}
Expand All @@ -18,8 +19,8 @@ Segment's Appsflyer destination code is open source and available on GitHub. You
1. From the Segment web app, click **Catalog**.
2. Search for "AppsFlyer" in the Catalog, select it, and choose which of your sources to connect the destination to.
3. In the destination settings, enter your `AppsFlyer Dev Key`, which can be retrieved from the App Settings section of your AppsFlyer account.
4. Follow the instructions in the GitHub repos: [iOS SDK](https://github.com/AppsFlyerSDK/segment-appsflyer-ios) and [Android SDK](https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration).
5. After you build and release to the app store, we start translating and sending your data to AppsFlyer automatically.
4. Follow the instructions in the GitHub repositories: [iOS SDK](https://github.com/AppsFlyerSDK/segment-appsflyer-ios){:target="blank"} and [Android SDK](https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration){:target="blank"}.
5. After you build and release to the app store, Segment starts translating and sending your data to AppsFlyer automatically.

**Important:** If you plan on using the server-side destination for an Android project, make sure to enter your **Android App ID**. If you are using only the mobile SDK, Android projects only require the **AppsFlyer Dev Key**. iOS projects always require both the **AppsFlyer Dev Key** and the **Apple App ID**. Also, note that if you do use the server-side destination, you will not be able to selectively disable calls sent to AppsFlyer using your Segment dashboard.

Expand Down Expand Up @@ -80,7 +81,7 @@ If you're not familiar with the Segment Specs, take a look to understand what th
traits:@{ @"email": @"john.doe@example.com" }];
```

When you call `.identify()`, we will use AppsFlyer's `setCustomerUserID` to send the `userId` that was passed in.
When you call `.identify()`, Segment uses AppsFlyer's `setCustomerUserID` to send the `userId` that was passed in.

**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.

Expand All @@ -95,9 +96,9 @@ If you're not familiar with the Segment Specs, take a look to understand what th

When you call `track`, Segment translates it automatically and sends the event to AppsFlyer.

We include 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 our spec'd properties.
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.

Finally, we automatically use AppsFlyer's `transactionId` deduplication when you send an an `orderId` (see the [e-commerce spec](/docs/connections/spec/ecommerce/v2/)).
Finally, Segment uses AppsFlyer's `transactionId` deduplication when you send an `orderId` (see the [e-commerce spec](/docs/connections/spec/ecommerce/v2/)).

### Server

Expand Down Expand Up @@ -136,23 +137,24 @@ analytics.track({
}
});
```
> Check your specific [serverside library docs](/docs/connections/sources/#server) for specifics on how to format the method properly.
> Check your specific [server-side library docs](/docs/connections/sources/#server) for specifics on how to format the method properly.

Finally, the serverside component will look for the following `properties` and handle them specially:
Finally, the server-side component will look for the following `properties` and handle them specially:

- `ip` (this should be the `ip` of your customer--this is not collected by Segment's libraries out-of-the-box)
- `timestamp` (refer to AppsFlyer's docs on [how they process timestamps](https://support.appsflyer.com/hc/en-us/articles/207034486-Server-to-Server-In-App-Events-API-HTTP-API-). Since our libraries generate a [timestamp](/docs/connections/spec/common/#timestamps), we will always set this value)
- `timestamp` (refer to AppsFlyer's docs on [how they process timestamps](https://support.appsflyer.com/hc/en-us/articles/207034486-Server-to-Server-In-App-Events-API-HTTP-API-){:target="blank"}. Since the libraries generate a [timestamp](/docs/connections/spec/common/#timestamps), Segment always sets this value)
- `currency` (defaults to `"USD"`)
- `revenue` (For `Order Completed` events, precedence is given to `total`, falling back to `properties.revenue`)

All other `properties` will be sent to AppsFlyer as custom properties inside `eventValue`.

> **Note:** Be sure to calibrate/update the time window in AppsFlyer's dashboard to see your events!
> info ""
> Be sure to calibrate/update the time window in AppsFlyer's dashboard to see your events!

## Install Attributed

### Client
Segment will automatically trigger an `Install Attributed` event if you have **trackAttributionData** enabled in your settings, and the Segment-AppsFlyer integration installed in your app. The event payload will adhere to our `Install Attributed` event specification documented [here](/docs/connections/spec/mobile/#install-attributed) and will propagate to your other downstream destinations.
Segment will automatically trigger an `Install Attributed` event if you have **trackAttributionData** enabled in your settings, and the Segment-AppsFlyer integration installed in your app. The event payload will adhere to the `Install Attributed` event specification documented [here](/docs/connections/spec/mobile/#install-attributed) and will propagate to your other downstream destinations.

### Server
If you are tracking events server-side, AppsFlyer can still send attribution postbacks but you will need to configure this functionality in your AppsFlyer account. To enable this, navigate to your AppsFlyer app and on the sidebar of the main screen click on **Integrated Partners** and search for Segment. You will be prompted with a couple of configuration options and asked to input your Segment Write Key. Once enabled, successfully attributed app installs will begin showing up as `Install Attributed` events similar to the client side behavior documented above.
Expand Down
2 changes: 2 additions & 0 deletions vale-styles/Vocab/Docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Adwords
allowlist
Amberflo
Appboy
Appsflyer
blocklist
boolean
Chargebee
Expand Down Expand Up @@ -70,6 +71,7 @@ upsert
US
utm
Vero
Vidora
viewability
WebKit
Wootric
Expand Down