mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Google Analytics: enable MXSession GA stats and send stat on launch screen display time.
This commit is contained in:
parent
deb866ee1c
commit
febdbdb86d
2 changed files with 14 additions and 1 deletions
|
@ -1350,6 +1350,9 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
// Disable identicon use
|
||||
[MXSDKOptions sharedInstance].disableIdenticonUseForUserAvatar = YES;
|
||||
|
||||
// Enable SDK stats upload to GA
|
||||
[MXSDKOptions sharedInstance].enableGoogleAnalytics = YES;
|
||||
|
||||
// Disable long press on event in bubble cells
|
||||
[MXKRoomBubbleTableViewCell disableLongPressGestureOnEvent:YES];
|
||||
|
|
|
@ -828,7 +828,17 @@
|
|||
}
|
||||
else if (launchAnimationContainerView)
|
||||
{
|
||||
NSLog(@"[HomeViewController] LaunchAnimation was shown for %.3fms", [[NSDate date] timeIntervalSinceDate:launchAnimationStart] * 1000);
|
||||
NSTimeInterval durationMs = [[NSDate date] timeIntervalSinceDate:launchAnimationStart] * 1000;
|
||||
NSLog(@"[HomeViewController] LaunchAnimation was shown for %.3fms", durationMs);
|
||||
|
||||
if ([MXSDKOptions sharedInstance].enableGoogleAnalytics)
|
||||
{
|
||||
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
|
||||
[tracker send:[[GAIDictionaryBuilder createTimingWithCategory:kMXGoogleAnalyticsStartupCategory
|
||||
interval:@((int)durationMs)
|
||||
name:kMXGoogleAnalyticsStartupLaunchScreen
|
||||
label:nil] build]];
|
||||
}
|
||||
|
||||
[launchAnimationContainerView removeFromSuperview];
|
||||
launchAnimationContainerView = nil;
|
||||
|
|
Loading…
Reference in a new issue