Appsflyer
This section describes how to integrate AppsFlyer with Purchasely
Integration
The integration of AppsFlyer requires 2 steps:
- Associate the user to events by providing the
AppsFlyer ID
to the Purchasely SDK - Activate the AppsFlyer integration in the Purchasely Console
Version compatibility
The minimal version of the Purchasely SDK supporting this integration is
v3.2.0
.If the Purchasely SDK integrated in your app is under the minimal version, please upgrade it.
The AppsFlyer SDK also needs to be integrated inside the app.
1. Associating users to events
See iOS or Android Appsflyer documentation for more information.
Purchasely.setAttribute(.appsflyerId, value: AppsFlyerLib.shared().getAppsFlyerUID())
AppsFlyerLib.getInstance().getAppsFlyerUID(applicationContext)?.let {
Purchasely.setAttribute(Attribute.APPSFLYER_ID, it)
}
appsFlyer.getAppsFlyerUID((err, appsFlyerUID) => {
if (err) {
console.error(err);
} else {
Purchasely.setAttribute(Attributes.APPSFLYER_ID, appsFlyerUID);
}
});
appsFlyerSdk.getAppsFlyerUID().then((AppsFlyerId) {
Purchasely.setAttribute(PLYAttribute.appsflyer_id,AppsFlyerId);
});
var getUserIdCallbackFn = function(id) {
alert('received id is: ' + id);
}
var appsFlyerId = window.plugins.appsFlyer.getAppsFlyerUID(getUserIdCallbackFn);
Purchasely.setAttribute(Purchasely.Attribute.APPSFLYER_ID, appsFlyerId);
private PurchaselyRuntime.Purchasely _purchasely;
_purchasely.SetAttribute(PLYAttribute.APPSFLYER_ID, "test_appsflyer_id");
2. Activating the AppsFlyer integration
Retrieving your app id in the AppsFlyer Dashboard
- Go to your AppsFlyer dashboard: https://hq1.appsflyer.com/apps/myapps
- You will find your app's ids beneath their names
Retrieving your API key in the AppsFlyer Dashboard
- Go to your AppsFlyer dashboard: https://hq1.appsflyer.com/apps/myapps
- Using the app's top right menu, access your app's settings
- You will find your app's API key at the top of the page
- (optional) repeat for your Android / iOS app
Enabling the AppsFlyer integration in the Purchasely Console
- Visit your Purchasely app's console
- Access your apps Integrations settings
-
Access the AppsFlyer Integration's Settings
-
Enable the AppsFlyer integration
-
Set your iOS AppsFlyer app's
API key
&app ID
-
Set your Android AppsFlyer app's
API key
&App ID
-
(optional) Override the name of events sent to AppsFlyer
-
Save
Updated 5 months ago