public async Task SendAction() { Countly.UserDetails.Name = UserName; await Countly.StartSession(Server, ApiKey); Countly.RecordView("ScreenA", MakeSegment()); var segmentation = MakeSegment(); segmentation.Add("type", "click"); segmentation.Add("x", "0"); segmentation.Add("y", "0"); segmentation.Add("width", "0"); segmentation.Add("height", "0"); Countly.RecordEvent("[CLY]_action", segmentation: segmentation); await Countly.EndSession(); }
public async Task SendViews() { Countly.UserDetails.Name = UserName; Countly.UserDetails.Custom["Level"] = "1"; Countly.UserDetails.Custom["Team"] = "Warriors"; await Countly.StartSession(Server, ApiKey); Countly.RecordView("ScreenA", MakeSegment()); await Task.Delay(3500); Countly.RecordView("ScreenB", MakeSegment()); await Task.Delay(1242); Countly.RecordView("ScreenC", MakeSegment()); await Task.Delay(2322); Countly.RecordView("ScreenD", MakeSegment()); Countly.RecordView("ScreenE", MakeSegment()); await Countly.EndSession(); }
public async Task ChangeMyTeamAndLevel() { Countly.UserDetails.Name = UserName; await Countly.StartSession(Server, ApiKey); Countly.RecordView("ScreenA", MakeSegment()); await Task.Delay(1000); Countly.RecordView("ScreenB", MakeSegment()); await Task.Delay(1000); Countly.RecordView("ScreenC", MakeSegment()); await Task.Delay(1000); Countly.RecordView("ScreenD", MakeSegment()); Countly.RecordView("ScreenE", MakeSegment()); Countly.UserDetails.Custom["Level"] = "3"; Countly.UserDetails.Custom["Team"] = "Warriors"; await Countly.EndSession(); }
public async Task SendViewsWithStartEnd() { Countly.UserDetails.Name = UserName; await Countly.StartSession(Server, ApiKey); Countly.RecordView("ScreenA", MakeSegment()); await Task.Delay(3500); Countly.RecordView("ScreenB", MakeSegment()); await Countly.EndSession(); //Should still be on ScreenB await Countly.StartSession(Server, ApiKey); await Task.Delay(1242); Countly.RecordView("ScreenC", MakeSegment()); await Task.Delay(2322); Countly.RecordView("ScreenD", MakeSegment()); await Countly.EndSession(); }
public async Task LongTestForSessions() { var random = new Random(); Countly.UserDetails.Name = UserName; await Countly.StartSession(Server, ApiKey); for (int i = 0; i < 200; i++) { if (random.Next(2) == 0) { Countly.RecordEvent("Action" + i, segmentation: MakeSegment()); } else { Countly.RecordView("Screen" + i, MakeSegment()); } await Task.Delay(1000); } await Countly.EndSession(); }