public void TrackScreen(string screenName)
        {
            var screenEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, screenName,
                                               AFEventParameter.AFEventParamContentType, "screen opened");

            AppsFlyerTracker.SharedTracker().TrackEvent(AFEventName.AFEventUpdate, screenEvent);
        }
예제 #2
0
        public static void Start()
        {
#if ENABLE_WINMD_SUPPORT
            Log("[Start]");
            AppsFlyerTracker.GetAppsFlyerTracker().TrackAppLaunchAsync(Callback);
#endif
        }
        public void TrackException(string message, bool isFatal)
        {
            var exceptionEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, "exception",
                                                  AFEventParameter.AFEventParamContentType, message,
                                                  AFEventParameter.AFEventParamDescription, $"Critical error: {isFatal}");

            AppsFlyerTracker.SharedTracker().TrackEvent("af_exception", exceptionEvent);
        }
        public void TrackEvent(string category, string action, string label, object model)
        {
            var cutsomEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, category,
                                               AFEventParameter.AFEventParamContentType, action,
                                               AFEventParameter.AFEventParamDescription, label);

            AppsFlyerTracker.SharedTracker().TrackEvent(AFEventName.AFEventUpdate, cutsomEvent);
        }
예제 #5
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 });
        }
예제 #6
0
        public static string GetAppsFlyerId()
        {
#if ENABLE_WINMD_SUPPORT
            Log("[GetAppsFlyerId]");
            return(AppsFlyerTracker.GetAppsFlyerTracker().GetAppsFlyerUID());
#else
            return("");
#endif
        }
        public void TrackECommerce(decimal fullPrice, float quantity, string orderId, string currency)
        {
            var makeOrderEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, "order",
                                                  AFEventParameter.AFEventParamContentType, "order created",
                                                  AFEventParameter.AFEventParamReceiptId, orderId,
                                                  AFEventParameter.AFEventParamRevenue, fullPrice.ToString(),
                                                  AFEventParameter.AFEventParamQuantity, quantity.ToString(),
                                                  AFEventParameter.AFEventParamCurrency, currency ?? "RUB");

            AppsFlyerTracker.SharedTracker().TrackEvent(AFEventName.AFEventPurchase, makeOrderEvent);
        }
예제 #8
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
        }
예제 #9
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);
        }
예제 #10
0
        public void Load()
        {
            var config = Mvx.Resolve <IAFConfigService>().Config;

            AppsFlyerTracker.SharedTracker().AppleAppID      = config.AppId;
            AppsFlyerTracker.SharedTracker().AppsFlyerDevKey = config.DevKey;

            _trackerDelegate = new CustomAppsFlyerDelegate();

            AppsFlyerTracker.SharedTracker().TrackAppLaunch();
            AppsFlyerTracker.SharedTracker().LoadConversionDataWithDelegate(_trackerDelegate);

            Mvx.RegisterSingleton <IAppsFlyerService>(() => new AppsFlyerService());
        }
예제 #11
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
        }
예제 #12
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
        }