Integrate AppsFlyer with Amplitude to share user attribution data and event analytics for better insights into user engagement, retention, and revenue. Choose between two integration versions, V1 or V2, depending on your use case and analytics needs.
About the integration
Amplitude, an AppsFlyer integrated partner, is a product analytics platform used by product, growth, and marketing teams to understand user behavior across mobile and web. The integration allows AppsFlyer to send key event data to Amplitude post-install, enabling comprehensive user-level analysis.
There are two Amplitude integration versions:
-
Amplitude V1:
This version uses Amplitude's Attribution API. AppsFlyer sends install data collected after the integration is complete. Amplitude uses Ad ID as the identifier and discards the data if no matching user event is logged within 72 hours. Learn more -
Amplitude V2 :
This version uses Amplitude's HTTP V2 API. AppsFlyer sends both installs and in-app event data after the integration is complete. Identifiers are prioritized (user_id and device_id), and if matching fails, a new user is logged. Learn more
Integration versions:
| Version | API used | Identifiers used | Event coverage |
|---|---|---|---|
| V1 | Attribution API | Advertising ID (AdID) | Installs only |
| V2 | HTTP V2 API |
user_id, device_id (fallback logic) |
Installs and in-app events |
重要:
- Choose either the Amplitude V1 or V2 integration. Do not use both simultaneously. Using both versions at the same time may result in duplicate events being sent to Amplitude.
- 一部のメディアソースは、第三者とのデータ共有を制限しています。そのため、ポストバックを送信するための構成済みの選択に関係なく、制限付きイベントのポストバックはこのパートナーに送信されません。
Prerequisites
Before you begin:
- Contact Amplitude to create an account if you don't already have one.
- Decide whether you will set up the Amplitude V1 or V2 integration.
- Make sure you avoid sending the same events from both the Amplitude SDK and AppsFlyer to prevent duplication.
- See the additional prerequisite for the Amplitude V2 integration.
Additional prerequisites for the Amplitude V2 integration
The V2 integration requires setup of the:
Amplitude device ID
To enable user-level attribution, you must pass the Amplitude Device ID into the AppsFlyer SDK. This value is sent with each postback.
Android
AppsFlyerLib.getInstance().setAdditionalData("AmplitudeDeviceId", amplitude.getDeviceId())
Language: Java/Kotlin
Documentation: Android SDK reference, Amplitude
iOS (Objective-C)
[[AppsFlyerLib shared] setAdditionalData:@{@"AmplitudeDeviceId": [[Amplitude instance] getDeviceId]}];
Language: Objective-C
Documentation: iOS SDK reference, Amplitude
iOS (Swift)
AppsFlyerLib.shared().customData = ["AmplitudeDeviceId": Amplitude.instance().getDeviceId()]
Language: Swift
Documentation: iOS SDK reference, Amplitude
Unity
Dictionary<string, string> customData = new Dictionary<string, string>();
customData.Add("AmplitudeDeviceId", Amplitude.getInstance().getDeviceId());
AppsFlyer.setAdditionalData(customData);
Language: C#
Documentation: Unity SDK reference
React Native
appsFlyer.setAdditionalData({"AmplitudeDeviceId": amplitude.getDeviceId()},
(res) => {
//...
}
);
Language: JavaScript
Documentation: React Native SDK reference
Cordova
appsFlyer.setAdditionalData({"AmplitudeDeviceId": amplitude.getDeviceId()});
Language: JavaScript
Documentation: N/A
Flutter
var data = {"AmplitudeDeviceId": amplitude.getDeviceId()};
appsFlyerSdk.setAdditionalData(data);
Language: Dart
Documentation: Flutter SDK reference
af_顧客ユーザーID
Set up the Customer User ID (CUID). This is a unique identifier typically generated and set
by the app owner during user registration. Learn more
Amplitude session ID
Set up the Amplitude session ID and pass it to AppsFlyer. Learn more
Android
AppsFlyerLib.getInstance().setAdditionalData("AmplitudeSessionId", amplitude.getSessionId())
Language: Java/Kotlin
Documentation: Android SDK reference
iOS (Objective-C)
[[AppsFlyerLib shared] setAdditionalData:@{@"AmplitudeSessionId": [[Amplitude instance] getSessionId]}];
Language: Objective-C
Documentation: iOS SDK reference
iOS (Swift)
AppsFlyerLib.shared().customData = ["AmplitudeSessionId": Amplitude.instance().getSessionId()]
Language: Swift
Documentation: iOS SDK reference
Unity
Dictionary<string, string> customData = new Dictionary<string, string>();
customData.Add("AmplitudeSessionId", Amplitude.getInstance().getSessionId());
AppsFlyer.setAdditionalData(customData);
Language: C#
Documentation: Unity SDK reference
React Native
appsFlyer.setAdditionalData({"AmplitudeSessionId": amplitude.getSessionId()},
(res) => {
//...
}
);
Language: JavaScript
Documentation: React Native SDK reference
Cordova
appsFlyer.setAdditionalData({"AmplitudeSessionId": amplitude.getSessionId()});
Language: JavaScript
Documentation: N/A
Flutter
var data = {"AmplitudeSessionId": amplitude.getSessionId()};
appsFlyerSdk.setAdditionalData(data);
Language: Dart
Documentation: Flutter SDK reference
Set up the integration
To set up the integration:
- 連携タブにて連携したいアプリを選択し、パートナーを有効にするをオンにしてください。
-
To set up the Amplitude V1 integration, select Amplitude V1 (Tech partner).
To set up the Amplitude V2 integration, select Amplitude V2 (Tech partner).
-
Once you've selected your Amplitude version, click Set up integration.
-
連携の設定をクリックします。
- Select your app.
-
連携タブにて連携したいアプリを選択し、パートナーを有効にするをオンにしてください。
- 以下の手順に従い、各タブの設定を完了してください。
連携タブ
連携タブは次のセクションに分かれています。
パートナーの有効化
このタブを初めて開く場合、連携タブのパラメーター設定を有効にするためにパートナーを有効にするをオンにする必要があります。このパートナーと連携を続ける限り、トグルをオンにしておく必要があります。
詳細は、パートナーの有効化をご覧ください。
一般的な設定
アドバンスデータ共有
Amplitudeとインストールに関する追加情報を共有するには、高度なデータ共有をオンにしてください。オンにすると、AmplitudeはAmplitude Propertyにマッピングされたインストールに関する(アプリ内イベント以外の)以下のデータを受け取ります。
| Amplitudeプロパティ | AppsFlyerデータポイント |
|---|---|
| sub_publisher | af_siteid |
| network_name | pid |
| adgroup_name | af_adset |
| creative_name | af_ad_id |
| installed_at | install_timestamp |
| search_term | af_keywords |
| channel | af_channel |
| user_id | af_customer_user_id |
| af_sub1 | af_sub1 |
| af_sub2 | af_sub2 |
| af_sub3 | af_sub3 |
| af_sub4 | af_sub4 |
| af_sub5 | af_sub5 |
| app_version | app_version |
Amplitude EU Data Center
Amplitude EU Data Centerがオフの場合、インストールのポストバックは米国のデータセンターに送られます。
AmplitudeのEUデータセンターにインストールポストバックを送信するには、Amplitude EU Data Centerをオンにしてください。
APIキー
Amplitudeは、固有のAPIキーを介してAppsFlyerに接続します。まだお持ちでない場合は、連携作業を続けるために、AmplitudeからこのAPIキーを取得するか、以下のステップに従ってください。
AmplitudeからAPIキーを取得する
注:注:APIキーにアクセスできるのは、Amplitudeで管理者またはマネージャの役割を持つユーザーのみです。
- Amplitudeアカウントにログインします。
-
From the top right of the page, click the settings icon > Organization Settings.
-
プロジェクトをクリックし、AppsFlyerにデータを送信するプロジェクトを選択します。
-
プロジェクトタブから、APIキーをコピーします。
- Amplitudeを設定する
デフォルトのポストバック
AppsFlyer は、ユーザーのインストール後に自動ポストバックを Mixpanel に送信できます。このセクションでは、各イベントに対して送信されるポストバックのユーザーの経路を設定できます。デフォルトポストバックについての詳細をご確認ください。
アプリ内イベントの設定
- APIキーを入力てください。
- When Amplitude Data Center is off, in-app events postbacks are sent to the US data center.
AmplitudeのEUデータセンターにアプリ内イベントのポストバックを送信するには、Amplitude Data Centerをオンにしてください。
設定を保存すると、AppsFlyerは次のデータをAmplitudeに送信します。
- デバイスID(IDFA / Google Advertising ID)
- Media Source
- キャンペーン名
iOSデバイス用IDFAを送信するには、ユーザーによるATTの同意と、高プライバシーポストバックの設定が適用されます。
アプリ内イベントポストバック
Amplitudeにアプリ内イベントのポストバックを送信するよう設定する。
計測リンクタブ
Amplitudeでは計測リンクは利用できません。
コストタブ
このパートナーとの連携では、コストデータはサポートされていません。
広告収益タブ
このパートナーとの連携では、広告収益はサポートされていません。
権限タブ
Amplitudeでは権限を利用できません。
Amplitudeコンソールでアトリビューションデータを表示
AppsFlyerからAmplitudeへ送信されたアトリビューションデータは、管理画面でイベントとして表示され、[AppsFlyer] という接頭辞がつきます。
重要:
Amplitudeでは、AppsFlyerからのデータを「Blocked」として表示している場合があります。 AmplitudeでAppsFlyerのデータが表示されない場合は、それがブロックされたイベントとして定義されているか確認してください。
AmplitudeイベントをAppsFlyerに送信
この統合により、Amplitudeイベントをサーバー間APIを介してAppsFlyerに送信することも可能です。これを行う方法については、Amplitudeのドキュメントを参照してください。