user2823044
user2823044

Reputation: 315

Google analytics not working in ios app

i'm using google analytics v3 in ios app(ios7).I insatlled libraires and framweworks.I follwed the instructions from https://developers.google.com/analytics/devguides/collection/ios/v3/ .But google analytics is not working from the logger i found "INFO: GoogleAnalytics 3.06 -[GAIBatchingDispatcher hitsForDispatch] (GAIBatchingDispatcher.m:281): No pending hits."

Upvotes: 4

Views: 2139

Answers (2)

Julian B.
Julian B.

Reputation: 3725

i ran into the same issue. i was under the impression that by adding and configuring the framework i was all set to go, but this isn't the case.

i had to do either one of the following:

  1. send events (@sjoerd perfors answer)
  2. adding at least 1 screen measurement (e.g. self.screenName = @"posting details";)

at this point this warning disappeared.

Upvotes: 1

Sjoerd Perfors
Sjoerd Perfors

Reputation: 2317

Perhaps missing the send ?

After initialising the tracker:

[[GAI sharedInstance] trackerWithTrackingId:@"UA-xxxx-x"];

Try this example:

id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                        @"appview", kGAIHitType, @"Home Screen", kGAIScreenName, nil];
[tracker send:params];

Upvotes: 2

Related Questions