Reputation: 197
I have a Google analytics
account with android already set,i need to integrate it with iPhone. I have done the coding part. I am using the same tracking ID
which I used in android. Currently only android device and android os is displayed in google account. How should I add iOS and iDevices in Google analytics account? Code is working fine, I have seen the changes in "Events"
Whether I need to do anything else...
Added SDK, libraries
Code follows
//Google Analytics:
- (void)startGoogleAnalyticsTracking {
@try {
[GAI sharedInstance].debug = NO;
[GAI sharedInstance].dispatchInterval = 120;
[GAI sharedInstance].trackUncaughtExceptions = YES;
self.googleAnalyticsTracker = [[GAI sharedInstance] trackerWithTrackingId:@"******"];
}@catch (NSException *exception) {
NSLog(@"exception:%@",exception);
}
}
- (void)sendGoogleAnalyticsStartup {
@try {
[self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Starts" withValue:nil];
}@catch (NSException *exception) {
NSLog(@"exception=%@",exception);
}
}
- (void)stopGoogleAnalyticsTracking {
@try {
[self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Suspended /Stopped" withValue:nil];
}@catch (NSException *exception) {
NSLog(@"exception=%@",exception);
}
}
Upvotes: 1
Views: 1597
Reputation: 2978
I am also working with Google Analytics in these days. And I noticed that it takes approximately 24 hours to see the result. However you can also test it in Real-Time menu whether or not the app sends the data.
Upvotes: 1