protected override void Init() { #if UNITY_IOS Core.Debugging.Debugger.Log("WaffleAppsFlyer init", (int)SharedSystems.Systems.APPS_FLYER); AppsFlyer.setAppsFlyerKey(Utils.EmbededCoreConfig.APPSFLYER_DEV_KEY); AppsFlyer.setAppID(Utils.EmbededCoreConfig.APPSFLYER_APP_ID); // For detailed logging AppsFlyer.setIsDebug(true); // For getting the conversion data will be triggered on AppsFlyerTrackerCallbacks.cs file AppsFlyer.getConversionData(); // For testing validate in app purchase (test against Apple's sandbox environment AppsFlyer.setIsSandbox(true); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID AppsFlyer.init(Utils.EmbededCoreConfig.APPSFLYER_DEV_KEY); AppsFlyer.setAppID(Utils.EmbededCoreConfig.ANDROID_PACKAGE_NAME); AppsFlyer.setIsDebug(true); //AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); #pragma warning disable 618 AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks", "didReceiveConversionData", "didReceiveConversionDataWithError"); #pragma warning restore 618 #endif }
void Start() { Application.runInBackground = true; Screen.orientation = ScreenOrientation.Portrait; DontDestroyOnLoad(this); AppsFlyer.setIsDebug(true); #if UNITY_IOS AppsFlyer.setAppsFlyerKey(DEV_KEY); AppsFlyer.setAppID(APP_ID); AppsFlyer.setIsDebug(true); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); // register to push notifications for iOS uninstall UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound); Screen.orientation = ScreenOrientation.Portrait; #elif UNITY_ANDROID AppsFlyer.init("WdpTVAcYwmxsaQ4WeTspmh"); //AppsFlyer.setAppID ("YOUR_APP_ID"); // for getting the conversion data AppsFlyer.loadConversionData("StartUp"); // for in app billing validation // AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); //For Android Uninstall //AppsFlyer.setGCMProjectNumber ("YOUR_GCM_PROJECT_NUMBER"); #endif }
public bool InitWithConfig(SDKConfig config, SDKAdapterConfig adapterConfig) { var name = AppsFlyerTrackerCallbacks.S.name; AppsflyerConfig appsflyerConfig = adapterConfig as AppsflyerConfig; AppsFlyer.setAppsFlyerKey(appsflyerConfig.appKey); if (appsflyerConfig.isDebugMode) { 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(config.iosAppID); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID(Application.identifier); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ //AppsFlyer.init(appsflyerConfig.appKey, "AppsFlyerTrackerCallbacks"); AppsFlyer.init(appsflyerConfig.appKey); AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks"); #endif return(true); }
void Start() { // register to push notifications //UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound); //Screen.orientation = ScreenOrientation.Portrait; /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("<AF_DEV_KEY>"); /* For detailed logging */ AppsFlyer.setIsDebug(true); #if UNITY_IOS AppsFlyer.setAppID("123456789"); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("com.appsflyer.unitysampleapp"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("AF_DEY_KEY", "AppsFlyerTrackerCallbacks"); #endif }
public void Init() { //GooglePlay以外平台如amzon平台,发布时需要调用该api #if UNITY_ANDROID && !UNITY_EDITOR UPTraceApi.setCustomerIdForAndroid(GetAndroidID()); #endif //欧盟用户展示gdpr弹窗,并在用户拒绝时调用disableAccessPrivacyInformation() //UPTraceApi.disableAccessPrivacyInformation(); //正式包请关闭该debug UPTraceApi.enalbeDebugMode(true); //init TraceSDK UPTraceApi.initTraceSDK(PRODUCTID, CHANNELID); //在线时长上报 OnlineReport(); //appsflyer AppsFlyer.setIsDebug(true); AppsFlyer.initSDK(AF_DEV_KEY, AF_APPID, this); //iOS 延迟调用上报,目的是确保首次上报在ATT弹窗获得结果之后 #if UNITY_IOS && !UNITY_EDITOR AppsFlyeriOS.waitForATTUserAuthorizationWithTimeoutInterval(60); #endif AppsFlyer.startSDK(); }
// Use this for initialization void Start() { AppsFlyer.setAppsFlyerKey("YOUR_APPSFLYER_DEV_KEY_HERE"); #if UNITY_IOS AppsFlyer.setAppID("YOUR_APPLE_APP_ID_HERE"); AppsFlyer.setIsDebug(true); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID // All Initialization occur in the override activity defined in the mainfest.xml, including track app launch // You can define AppsFlyer library here use this commented out code. // un-comment this in case you are not working with the android manifest file //AppsFlyer.setAppID ("YOUR_ANDROID_PACKAGE_NAME_HERE"); // for getting the conversion data //AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks","didReceiveConversionData", "didReceiveConversionDataWithError"); // for in app billing validation //AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); //AppsFlyer.trackAppLaunch (); #endif print("AppsFlyerId = " + AppsFlyer.getAppsFlyerId()); }
// Use this for initialization void Start() { Screen.orientation = ScreenOrientation.Portrait; #if UNITY_IOS AppsFlyer.setAppsFlyerKey("YOUR_DEV_KEY"); AppsFlyer.setAppID("YOUR_APP_ID"); AppsFlyer.setIsDebug(true); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID // if you are working without the manifest, you can initialize the SDK programatically. AppsFlyer.init("YOUR_DEV_KEY"); AppsFlyer.setIsDebug(true); // un-comment this in case you are not working with the android manifest file AppsFlyer.setAppID("YOUR_PACKAGE_NAME"); // for getting the conversion data AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks", "didReceiveConversionData", "didReceiveConversionDataWithError"); // for in app billing validation // AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure"); #endif }
//******************************// private void Start() { // These fields are set from the editor so do not modify! //******************************// AppsFlyer.setIsDebug(isDebug); AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null); //******************************// AppsFlyer.startSDK(); }
void appsFlyerInit() { AppsFlyer.setAppsFlyerKey("<DEV_KEY>"); AppsFlyer.setIsDebug(true); AppsFlyer.setAppID("<APP_ID>"); AppsFlyer.setIsSandbox(true); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); }
//******************************// public override void InitializeAnalytics() { base.InitializeAnalytics(); // These fields are set from the editor so do not modify! //******************************// AppsFlyer.setIsDebug(isDebug); AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null); //******************************// }
private void InitAF() { AppsFlyer.setAppsFlyerKey(devKeyId); AppsFlyer.setIsDebug(isDebug); #if UNITY_ANDROID && !UNITY_EDITOR AppsFlyer.setAppID(androidPackageName); AppsFlyer.init(devKeyId); #elif UNITY_IOS && !UNITY_EDITOR AppsFlyer.setAppID(iosAppId); AppsFlyer.trackAppLaunch(); #endif }
private void Initialize(string trUserId) { if (!this.initialized) { AppsFlyer.setIsDebug(ConfigSdk.SDK_DEBUG); AppsFlyer.setAppsFlyerKey(ConfigSdk.APPSFLYER_DEV_KEY); AppsFlyer.setCustomerUserID(trUserId); AppsFlyer.setAppID(ConfigSdk.ANDROID_PACKAGE_NAME); AppsFlyer.setIsDebug(ConfigSdk.SDK_DEBUG); AppsFlyer.getConversionData(); this.initialized = true; } }
public void Initialize() { AppsFlyer.setIsDebug(isDebug); AppsFlyer.setIsSandbox(isSandbox); AppsFlyer.setAppsFlyerKey(devKey); #if UNITY_IOS AppsFlyer.setAppID(iOSAppId); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID AppsFlyer.setAppID(androidAppId); AppsFlyer.init(devKey, "AppsFlyerTrackerCallbacks"); #endif AppsFlyer.trackAppLaunch(); }
private void Start() { try { #if USE_APPSFLYER AppsFlyer.setIsDebug(false); //LoadEvent(); #endif } catch (Exception ex) { Debug.LogError(TAG + " Init Exception: " + ex.Message); } }
//******************************// void Start() { // These fields are set from the editor so do not modify! //******************************// AppsFlyer.setIsDebug(isDebug); #if UNITY_WSA_10_0 && !UNITY_EDITOR AppsFlyer.initSDK(devKey, UWPAppID, getConversionData ? this : null); #else AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null); #endif //******************************/ AppsFlyer.startSDK(); }
void InitAppsFlyerSDK() { #if UNITY_IOS && !UNITY_EDITOR if (useATT) { AppsFlyeriOS.waitForATTUserAuthorizationWithTimeoutInterval(attDuration); } if (disableSKAd) { AppsFlyeriOS.disableSKAdNetwork(true); } #endif // These fields are set from the editor so do not modify! //******************************// AppsFlyer.setIsDebug(true); AppsFlyer.initSDK(devKey, appId, this); //******************************// if (useUDL) { AppsFlyer.OnDeepLinkReceived += OnDeepLink; } if (!String.IsNullOrEmpty(userInviteOneLinkId)) { AppsFlyer.setAppInviteOneLinkID(userInviteOneLinkId); } if (!String.IsNullOrEmpty(cuid)) { AppsFlyer.setCustomerUserId(cuid); } onSDKStarted(); if (DelaySdkStartTime > 0) { StartCoroutine(DelaySdkStartUp()); } else { AppsFlyer.startSDK(); } }
public AppsflyerUtils(string appsflyerDevKey, string appId, bool isDebugMode) { #if TRACKING_APPSFLYER AppsFlyer.setIsDebug(isDebugMode); AppsFlyer.anonymizeUser(isDebugMode); AppsFlyer.initSDK(appsflyerDevKey, appId); AppsFlyer.startSDK(); #if UNITY_ANDROID && TRACKING_FIREBASE Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived; #endif #if UNITY_IOS UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound); #endif #endif }
public override System.Collections.Generic.IEnumerator <byte> Auth(string key, ServiceItem serviceItem) { #if APPSFLYER_ANALYTICS_API AppsFlyer.setIsDebug(this.isDebug); AppsFlyer.setAppsFlyerKey(key); #if UNITY_IOS AppsFlyer.setAppID(this.iosAppId); AppsFlyer.trackAppLaunch(); AppsFlyer.getConversionData(); UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound); #elif UNITY_ANDROID AppsFlyer.setAppID(this.androidAppId); AppsFlyer.init(this.androidDevKey); AppsFlyer.setGCMProjectNumber(this.androidGCMProjectNumber); #endif #endif yield return(0); }
public static void Setup() { AppsFlyer.setAppsFlyerKey("WMa4kPf8ZdvNhcpvdpwAvE"); AppsFlyer.setIsDebug(true); AnalyticsManager.InitialiseAndroid(); DebugUtility.Log("AnalyticsManager : Setup"); GameObject gameObject = new GameObject("AppsFlyerTrackerCallbacks"); gameObject.AddComponent <AppsFlyerTrackerCallbacks>(); Object.DontDestroyOnLoad((Object)gameObject); AnalyticsManager.SetCurrentVersion(); AnalyticsManager.TrackTutorialCustomEvent("funnel.tutorial.splash", new Dictionary <string, object>() { { "step_number", (object)"1" } }); }