trackPageView on Google Analytics for iPhone Not Working

Posted by DigitalZombieKid on Stack Overflow See other posts from Stack Overflow or by DigitalZombieKid
Published on 2009-12-22T20:00:53Z Indexed on 2010/04/18 2:23 UTC
Read the original article Hit count: 394

I'm trying to get Google Analytics working on an iPhone application without much luck.

I've followed all the instructions on their website (google/apis/analytics/docs/tracking/mobileAppsTracking.html) and studied their sample application (google/gaformobileapps/GoogleAnalyticsIphone_0.7.tar.gz).

When I run my application and go to Google Analytics' website (https://www.google.com/analytics/reporting/), the only page that is recording is /app_entry_point. I'm seeing one count in my Google Analytics detailed report once every time my app fires up. However, I have added other pages to be tracked but it's not working. Here is a sample of two pages I've added to be tracked:

trackPageview:@"/calculator";
trackPageview:@"/tellafriend";

I call them from various ViewControllers in the app. In each of those view controllers I import the the GANTracker header:

#import "GANTracker.h"

I'll admit it: I'm an objective-c newbie. Any help you can offer is greatly appreciated! Do I need to physically dispatch them to get the trackPageview working? If so, why is the /app_entry_point page the only page that is recorded by Google Analytics?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c