Cannot get Google Analytics API to register page views on iPhone
- by Sebastien
I would like to gather usage statistics for my iPhone app using Google Analytics so I'm trying to configure it using the following tutorial: http://code.google.com/intl/fr-FR/apis/analytics/docs/tracking/mobileAppsTracking.html
I think I did everything they indicate in the documentation, and I get no error on the iPhone side, but I don't see any visits in Google Analytics.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    [self initGoogleAnalytics];
//...
}
-(void)initGoogleAnalytics{
    [[GANTracker sharedTracker] startTrackerWithAccountID:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"GoogleAnalyticsCode"]
                                           dispatchPeriod:-1
                                                 delegate:nil
    NSError *error;
    if(![[GANTracker sharedTracker] trackPageview:@"/home" withError:&error]){
        NSLog(@"%@", [error localizedDescription], nil);
    }
    [[GANTracker sharedTracker] dispatch];
}
Any idea why this is not working?