Analytics: Create a generic API in AppDelegate class

And move all Google Analytics code to AppDelegate.m
This commit is contained in:
manuroe
2017-12-22 13:19:40 +01:00
parent 1dc9615ed6
commit 7de8c429ad
26 changed files with 96 additions and 199 deletions
@@ -106,14 +106,9 @@
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// Screen tracking (via Google Analytics)
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
if (tracker)
{
[tracker set:kGAIScreenName value:@"RoomFilesSearch"];
[tracker send:[[GAIDictionaryBuilder createScreenView] build]];
}
// Screen tracking
[[AppDelegate theDelegate] trackScreen:@"RoomFilesSearch"];
// Observe kAppDelegateDidTapStatusBarNotificationObserver.
kAppDelegateDidTapStatusBarNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kAppDelegateDidTapStatusBarNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {