// Use this for initialization void Start() { //Mandatory - set your AppsFlyer’s Developer key. AppsFlyer.setAppsFlyerKey("ZmysHsNw9VtBeDmP4maYab"); // // For detailed logging //AppsFlyer.setIsDebug (true); #if UNITY_IOS //Mandatory - set your apple app ID AppsFlyer.setAppID("YOUR_APP_ID_HERE"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID //Mandatory - set your Android package name AppsFlyer.setAppID(Application.bundleIdentifier); AppsFlyer.init("ZmysHsNw9VtBeDmP4maYab"); AppsFlyer.setGCMProjectNumber("60588766610"); #endif //For getting the conversion data in Android, you need to this listener. AppsFlyer.loadConversionData(name, "didReceiveConversionData", "didReceiveConversionDataWithError"); AppsFlyer.createValidateInAppListener(name, "onInAppBillingSuccess", "onInAppBillingFailure"); string[] keys; string[] values; if (!PlayerPrefs.HasKey("AppsFlyAnalytics")) { PlayerPrefs.SetInt("AppsFlyAnalytics", 1); keys = new string[] { "status" }; values = new string[] { "new" }; TrackEvent("NewUser", keys, values); } }
private void InitAppsFlyer() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("BdP724hHJFraJaxKXvNex7"); /* For detailed logging */ //AppsFlyer.setIsDebug (true); #if UNITY_IOS /* Mandatory - set your apple app ID * NOTE: You should enter the number only and not the "ID" prefix */ AppsFlyer.setAppID("1472690984"); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("net.gogame.dusktodawn"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("BdP724hHJFraJaxKXvNex7", "AppsFlyerTrackerCallbacks"); AppsFlyer.createValidateInAppListener("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); #endif AFTrackRichEvent("app_open"); }
private static void InitialiseAndroid() { AppsFlyer.setAppID(AnalyticsManager.mBundleID); AppsFlyer.createValidateInAppListener("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); Upsight.init(); }