AAV
AAV

Reputation: 3813

Google Analytics not sending data ! Getting 0 active user

I am using following code in my - didFinishLaunchingWithOptions. But I can't see any active user in GA. Do I need to add some more configuration ?

Note: UAYourTrackingID is correct.

    // Optional: automatically send uncaught exceptions to Google Analytics.
[GAI sharedInstance].trackUncaughtExceptions = YES;
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
[GAI sharedInstance].dispatchInterval = 20;
// Optional: set debug to YES for extra debugging information.
[GAI sharedInstance].debug = YES;
// Create tracker instance.
[[GAI sharedInstance] trackerWithTrackingId:UAYourTrackingID];

[[[GAI sharedInstance] defaultTracker] sendView:@"RootView"];

Upvotes: 2

Views: 4049

Answers (3)

boreas
boreas

Reputation: 1061

you won't see them in the first day. just be patient and wait till the second day and you get everything listed, at least for my case. the active user also takes some time to show up.

Upvotes: 3

VaroX
VaroX

Reputation: 430

Try this just in case:

id tracker = [[GAI sharedInstance] trackerWithTrackingId:@"YOUR ID"];
[tracker sendView:@"you text"];

importing in your app delegate the following:

import "GAI.h"
import "GAITrackedViewController.h"

however, make sure your GA Tracking ID is not for web pages... it has to be specific for mobile apps.

I hope it helps, good luck!

Upvotes: 1

Vinzius
Vinzius

Reputation: 2901

I think your problem is on the google analytics admin.

Since the "v2" beta, you need to add an "app" profile in your google analytics admin. So now you have the "web" profile, and the "app" profile.

You won't need to change your "UAYourTrackingID", it's just to make the difference between the "web" from the "app".

Check this webpage : http://support.google.com/analytics/bin/answer.py?hl=en&answer=2614741

I hope this was your problem ^^

Edit: you can find it explained on this "v2 migration" page https://developers.google.com/analytics/devguides/collection/ios/v2/migration

Upvotes: 4

Related Questions