public static void TrackLevel(int level) { AppmetrPlatformPlugin.AttachProperties(new Dictionary <string, object> { { "$level", level } }); }
public static void TrackLevel(int level, IDictionary <string, object> properties) { if (properties == null) { properties = new Dictionary <string, object>(); } properties.Add("$level", level); AppmetrPlatformPlugin.AttachProperties(properties); }
/// <summary> /// Sets mandatory plugin parameters /// </summary> /// <param name="token">Deploy token as assigned on backend</param> /// <param name="platform">Platform or store name. Changes behaviour of /// certain events, especially payment tracking. Optional</param> public static void Setup(string token, string platform = null) { AppmetrPlatformPlugin.SetupWithToken(token, platform); AppmetrPlatformPlugin.AttachProperties(new Dictionary <string, object> { { "cpu", SystemInfo.processorType }, { "cpu_cores", SystemInfo.processorCount }, { "cpu_frequency", SystemInfo.processorFrequency }, { "gpu", SystemInfo.graphicsDeviceName }, { "ram", SystemInfo.systemMemorySize }, { "screen_size", GetScreenDiagonal() }, { "screen_resolution", $"{Screen.currentResolution.width}x{Screen.currentResolution.height}" }, { "device_model", SystemInfo.deviceModel } }); }
/// <summary> /// Method for attaching user properties. /// </summary> /// <param name='properties'> /// Properties. /// </param> public static void AttachProperties(IDictionary <string, object> properties) { AppmetrPlatformPlugin.AttachProperties(properties); }
/// <summary> /// Method for attaching only built-in user properties. /// </summary> public static void AttachProperties() { AppmetrPlatformPlugin.AttachProperties(); }