Beispiel #1
0
        public static void Start()
        {
#if ENABLE_WINMD_SUPPORT
            Log("[Start]");
            AppsFlyerTracker.GetAppsFlyerTracker().TrackAppLaunchAsync(Callback);
#endif
        }
Beispiel #2
0
        public static void Callback(AppsFlyerLib.ServerStatusCode code)
        {
            Log("[Callback]: {0}", code.ToString());

            AppsFlyerRequestEventArgs eventArgs = new AppsFlyerRequestEventArgs((int)code, code.ToString());
            var method = _gameObject.GetType().GetMethod("AppsFlyerOnRequestResponse");

            method.Invoke(_gameObject, new object[] { AppsFlyerTracker.GetAppsFlyerTracker(), eventArgs });
        }
Beispiel #3
0
        public static string GetAppsFlyerId()
        {
#if ENABLE_WINMD_SUPPORT
            Log("[GetAppsFlyerId]");
            return(AppsFlyerTracker.GetAppsFlyerTracker().GetAppsFlyerUID());
#else
            return("");
#endif
        }
Beispiel #4
0
        public static void SetCustomerUserId(string customerUserId)
        {
#if ENABLE_WINMD_SUPPORT
            Log("[SetCustomerUserId] customerUserId: {0}", customerUserId);
            if (customerUserId.Contains("test_device:"))
            {
                string testDeviceId = customerUserId.Substring(12);
                AppsFlyerTracker.GetAppsFlyerTracker().testDeviceId = testDeviceId;
            }
            AppsFlyerTracker.GetAppsFlyerTracker().customerUserId = customerUserId;
#endif
        }
Beispiel #5
0
        private static void InitTrackers()
        {
            FlurryWP8SDK.Api.StartSession(Constants.FLURRY_API_KEY);
            AppsFlyerTracker tracker = AppsFlyerTracker.GetAppsFlyerTracker();

            tracker.appId  = "9nblgggzvpw5";
            tracker.devKey = "Rgygvcq62VyDZoQyZp2Yje";
            tracker.TrackAppLaunch();

            Dictionary <string, Object> addToCartParams = new Dictionary <string, Object>();

            addToCartParams.Add("Enter register screen", "test1234");
            AppsFlyerLib.AppsFlyerTracker.GetAppsFlyerTracker().TrackEvent("Enter register screen", addToCartParams);
        }
Beispiel #6
0
        public static void InitSDK(string devKey, string appId, MonoBehaviour gameObject)
        {
#if ENABLE_WINMD_SUPPORT
#if AFSDK_WIN_DEBUG
            // Remove callstack
            Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);
#endif
            Log("[InitSDK]: devKey: {0}, appId: {1}, gameObject: {2}", devKey, appId, gameObject == null ? "null" : gameObject.ToString());
            AppsFlyerTracker tracker = AppsFlyerTracker.GetAppsFlyerTracker();
            tracker.devKey = devKey;
            tracker.appId  = appId;
            // Interface
            _gameObject = gameObject;
#endif
        }
Beispiel #7
0
        public static void LogEvent(string eventName, Dictionary <string, string> eventValues)
        {
#if ENABLE_WINMD_SUPPORT
            IDictionary <string, object> result = new Dictionary <string, object>();
            foreach (KeyValuePair <string, string> kvp in eventValues)
            {
                result.Add(kvp.Key.ToString(), kvp.Value);
            }

            Log("[LogEvent]: eventName: {0} result: {1}", eventName, result.ToString());

            AppsFlyerTracker tracker = AppsFlyerTracker.GetAppsFlyerTracker();
            tracker.TrackEvent(eventName, result);
#endif
        }