I've already integrated google analytics SDK v3 in my iOS application and I need now to track the screen views. Here is what I'm currently seeing on their website:
Here is the code I'm using(Manual Screen Measurement):
+ (void)setupGoogleAnalytics
{
// User must be able to opt out of tracking
[GAI sharedInstance].optOut = NO;
// Initialize Google Analytics with a 120-second dispatch interval. There is a
// tradeoff between battery usage and timely dispatch.
[GAI sharedInstance].dispatchInterval = 120;
[GAI sharedInstance].trackUncaughtExceptions = YES;
[[GAI sharedInstance].logger setLogLevel:kGAILogLevelVerbose];
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
[[GAI sharedInstance] trackerWithName:[infoDictionary objectForKey:@"CFBundleDisplayName"] trackingId:GOOGLE_ANALYTICS_TOKEN];
[[GAI sharedInstance].defaultTracker set:kGAIAppVersion value:[infoDictionary objectForKey:@"CFBundleShortVersionString"]];
}
+ (void)dispatchLogView:(NSString *)viewName Category:(NSString *)category action:(NSString *)action label:(NSString *)label value:(NSNumber*)value withProperties:(NSDictionary *)dictProp
{
NSMutableDictionary *event = [[GAIDictionaryBuilder createEventWithCategory:category
action:action
label:label
value:value] build];
[[GAI sharedInstance].defaultTracker send:event];
[[GAI sharedInstance].defaultTracker set:kGAIScreenName value:viewName];
[[GAI sharedInstance].defaultTracker set:kGAIDescription value:viewName];
[[GAI sharedInstance].defaultTracker send:[[GAIDictionaryBuilder createAppView] build]];
[[GAI sharedInstance] dispatch];
}
SetupGoogleAnalytics is called on didFinishLaunchingWithOptions. After making these changes, I'm still seeing zero under the "Screen Views"&"Screens/Session" sections. Honestly, I don't know what I'm missing to have it working properly. Here is the link I used to integrate it https://developers.google.com/analytics/devguides/collection/ios/v3/screens#manual
Does anyone encounter the same problem before? Does anyone have any input on this?
Thanks in advance for your help...