[DEPRECATED] Please note that this repo is deprecated and was moved to https://github.com/AppsFlyerSDK/appsflyer-unity-adrevenue-generic-connector
🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to support@appsflyer.com
When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.
This plugin requires the AppsFlyer Unity plugin version >= 4.22.x. and <= 6.4.41
⚠️ There are breaking changes when upgrading from version 1.x to 2.x
Starting from v2.x, the plugin uses the The External Dependency Manager for Unity.
To support these changes first remove all the files from v1.x and only after that add the v2.x unity package.
Note: You must have the AppsFlyer Unity plugin already in your project. In addition, make sure to init AppsFlyer SDK before AppsFlyerAdRevenue.
From version 6.4.3
of AppsFlyer-AdRevenue, we provide an additional new api that allow you send data from the impression payload to AdRevenue no matter which mediation network you use:
using AppsFlyerSDK;
public class AppsFlyerObjectScript : MonoBehaviour
{
void Start()
{
AppsFlyerAdRevenue.start(AppsFlyerAdRevenueType.Generic);
/* AppsFlyerAdRevenue.setIsDebug(true); */
}
....
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("custom", "foo");
dic.Add("custom_2", "bar");
dic.Add("af_quantity", "1");
AppsFlyerAdRevenue.logAdRevenue("facebook", AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeMoPub, 0.026, "USD", dic);
}
using AppsFlyerSDK;
public class AppsFlyerObjectScript : MonoBehaviour
{
void Start()
{
AppsFlyerAdRevenue.start(AppsFlyerAdRevenueType.MoPub);
/* AppsFlyerAdRevenue.setIsDebug(true); */
}
}
Check out the API here.
Note: AppsFlyerAdRevenue currently supports MoPub only