4

I have a problem with real-time data using Google Analytics v3.1 Users, events, e-commerce is working fine, but real-time features like screen tracking is not showing.

Here is GAI initialiser code:

  [GAI sharedInstance].trackUncaughtExceptions = YES;

  [GAI sharedInstance].dispatchInterval = 20;

  [[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];

  [[GAI sharedInstance] trackerWithTrackingId:@"MY-TRACK-ID"];

Then I inherited all my view controllers from GAITrackedViewController via subclassing all controllers from BaseViewController : GAITrackedViewController. Then I set screen names for all needed controllers in - (void) viewDidLoad method like

- (void)viewDidLoad {
    [super viewDidLoad];
    self.screenName = @"Some Screen Name";
}

No error showing, data dispatches successfully(I suppose). Also I tried to put this line to - (void)viewWillAppear: method, but nothing happened. Tracking ID is absolutely correct, cause another features is working fine.

Also I tried to send screens manually:

id tracker = [[GAI sharedInstance] defaultTracker];

// This screen name value will remain set on the tracker and sent with
// hits until it is set to a new value or to nil.
[tracker set:kGAIScreenName
       value:@"Some screen name"];

[tracker send:[[GAIDictionaryBuilder createAppView] build]];

And the same result. Even if manually call dispatch method.

I notice strange thing that self.tracker instance in each my view controller is nil, but [[GAI sharedInstance] defaultTracker] returns tracker value, as expected.

Thanks in advance!

UPDATE 1

@djabi Here is verbose log:

XXXX[285:31027] GoogleConversionPing: Already sent successful ping with conversion label XXXXXXX.
XXX[285:31091] VERBOSE: GoogleAnalytics 3.10 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:497): Saved hit: {
    parameters =     {
        "&_crc" = 0;
        "&_u" = ".etnyL";
        "&_v" = "mi3.1.0";
        "&a" = 1172034152;
        "&aid" = "my.app.id";
        "&an" = AppName;
        "&ate" = "<null>";
        "&av" = "2.34";
        "&cid" = "Id";
        "&ds" = app;
        "&ea" = AppOpen;
        "&ec" = AppOpen;
        "&el" = AppOpen;
        "&ev" = "<null>";
        "&idfa" = "<null>";
        "&sr" = 320x568;
        "&t" = event;
        "&tid" = "GAI_TRACK_ID";
        "&ul" = ru;
        "&v" = 1;
        "&z" = 272140373952857015;
        gaiVersion = "3.10";
    };
    timestamp = "2015-02-19 17:33:12 +0000";
}
XXXX[285:31027] INFO: GoogleAnalytics 3.10 -[GAIReachabilityChecker reachabilityFlagsChanged:] 
  • Maxim, how long you waited after you sent the screen view hits? Can you share the verbose log output? – djabi Feb 17 '15 at 23:02
  • One more question. Did you call [super viewDidAppear] from your viewDidAppear override? – djabi Feb 18 '15 at 00:07
  • @djabi about 5-7 minutes. Yep, I call `[super viewDidAppear]`. Else it give an error that view name is missed. – Maxim Sysenko Feb 18 '15 at 11:18
  • If this is a new Analytics account it might take up to 24 hours before real time data will show up. In your log you have "GAI_TRACK_ID" as &tid value. Is that the actual value in the log or you replaced it for privacy reasons? Your tid field should be a valid tracker id, something like UA-########-1. – djabi Feb 20 '15 at 05:46
  • @djabi yep, its cause privacy reasons. – Maxim Sysenko Feb 21 '15 at 12:20

0 Answers0