Cannot get Google Analytics API to register page views on iPhone

Posted by Sebastien on Stack Overflow See other posts from Stack Overflow or by Sebastien
Published on 2010-01-08T20:49:48Z Indexed on 2010/04/18 2:23 UTC
Read the original article Hit count: 548

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about google-analytics

Related posts about iphone