public void TrackScreen(string screenName) { var screenEvent = new NSDictionary(AFEventParameter.AFEventParamContentId, screenName, AFEventParameter.AFEventParamContentType, "screen opened"); AppsFlyerTracker.SharedTracker().TrackEvent(AFEventName.AFEventUpdate, screenEvent); }
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); }
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 }); }
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); }
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 }
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); }
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()); }
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 }
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 }