Hi, I am trying to integrate Google Analytics in my iOS app. But it doesnβt work when I open dashbord of analytics, showing users 0 in real time, in fact it always shows this zero.
follow the steps that i have done so far
1. Download the Google Analytics SDK for iOS.
then I just followed this developer.google.com link
these are my codes.
in appdelegate.h - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //analytics // Optional: automatically send uncaught exceptions to Google Analytics. [GAI sharedInstance].trackUncaughtExceptions = YES; // Optional: set Google Analytics dispatch interval to eg 20 seconds. [GAI sharedInstance].dispatchInterval = 20; // Optional: set Logger to VERBOSE for debug information. [[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose]; // Initialize tracker. id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"UA-********-*"]; return YES; } in my viewcontroller.h file #import "GAITrackedViewController.h" #import <UIKit/UIKit.h> @interface TopNewsViewController : GAITrackedViewController{ } @property(nonatomic,retain)NSString *screenName; @end in my viewcontroller.m
The following is a print in my journal
2014-01-16 19:39:56.766 tempfiles12[844:60b] <Google> To get test ads on this device, call: request.testDevices = [NSArray arrayWithObjects:@"12d2c8c8808caa10aa1f6d947afc7f33", nil]; 2014-01-16 19:39:57.555 tempfiles12[844:60b] INFO: GoogleAnalytics 3.02 -[GAIReachabilityChecker reachabilityFlagsChanged:] (GAIReachabilityChecker.m:159): Reachability flags update: 0X000002 2014-01-16 19:39:57.563 tempfiles12[844:1803] ERROR: unable to get the receiver data from the DB! 2014-01-16 19:39:57.571 tempfiles12[844:60b] INFO: GoogleAnalytics 3.02 -[GAITrackedViewController viewDidAppear:] (GAITrackedViewController.m:21): Tracked view controller missing view name. 2014-01-16 19:39:57.611 tempfiles12[844:5317] VERBOSE: GoogleAnalytics 3.02 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:414): Saved hit: { parameters = { "&_u" = ".o-etnoK-L"; "&_v" = "mi3.0.2"; "&an" = tempfiles12; "&av" = "6.0"; "&cid" = "b34bfd7f-45f8-4f4e-84a5-a0d0988e7356"; "&sr" = 768x1024; "&t" = appview; "&tid" = "UA-47216473-1"; "&ul" = en; "&v" = 1; "&z" = 4061780796142886022; TopNewsViewController = "Home Screen"; gaiVersion = "3.02"; }; timestamp = "2014-01-16 14:09:57 +0000"; } 2014-01-16 19:40:17.009 tempfiles12[844:5317] VERBOSE: GoogleAnalytics 3.02 -[GAIRequestBuilder requestGetUrl:payload:] (GAIRequestBuilder.m:177): building URLRequest for https:
Dashboard

ios objective-c analytics google-analytics
Bangalore
source share