IOS: Google Analytics user sync report not updating in my Google Analytics account

I am trying to track the speed of my application using Google Analytics, but I could not see anything with the speed of the application in my Google Analytics account. I tracked other parameters like events, crashes and exceptions. For these parameters, I can see the reports generated in my analytic Google account. Below is the code that I use to send the event time.

self.endDate=[NSDate date]; double timeDiff=[_startDate timeIntervalSinceDate:_endDate]; NSLog(@"timeDiff----%f",timeDiff); if([[[GAI sharedInstance]defaultTracker] sendTimingWithCategory:category withValue:timeDiff withName:@"LoadTime" withLabel:category]) { NSLog(@"Succesfully sent load time to GA"); } 

The following is a message printed on the console.

GoogleAnalytics 2.0b4 - [GAIDispatcher dispatchComplete: withStartTime: withRetryNumber: withResponse: Withdata: withError:] (GAIDispatcher.m: 415) DEBUG: Hit / GAIHit / p479 successfully sent (0 attempts).

Provide me with any sample code if you have one. Please help me with this. Thanks in advance.

+8
ios google-analytics
source share
5 answers

I found that the interval must be an integer. It expects milliseconds, but NSTimeInterval is seconds, so it tries to send it as "3.1234", but if you convert it to whole milliseconds, it will send it as 3123, and you will see the results. For conversion I used (GA V3)

 [tracker send:[[GAIDictionaryBuilder createTimingWithCategory:category interval:@((int)(interval * 1000)) name:name label:label] build]] 
+22
source share

Have you ever seen the real-time data tab in the GA control panel ??? They show the last 30 minutes of data usage. It is later updated in the Google Analytics toolbar. I worked with a flurry of Google analytics, I find GA better and faster. Keep trying !!!.

+1
source share

Your implementation seems beautiful. I don't think this is a problem (and since you are getting major events, this is probably not an initialization problem). I have the same way of recording synchronization events (you can find my code below if you want to compare).

I can tell you:

1 / This is beta strong> (yes, everything @google is in beta xD) is rather unstable, and events require time to be displayed in the administration (I do not see, for example, any events for February 18). At least more than for a site with similar statistics.

2 / I can not display time events for more than 2 days or show me some errors ^^ (maybe too much data is set for a large time zone)

3 / If there is no tag, do not put a category, just set nil. The same goes for the name. I think both of them are optional parameters. And this will slow down the display of your analytics when you have more statistics.

4 / For a large dataset, temporary events are calculated based on your visits. But that should not be your problem right now ^^ http://support.google.com/analytics/bin/answer.py?hl=en&answer=1042498

Wait 2 days. If you still don’t see anything, try contacting your Google Analytics representative. Or take the "risk" to send it as it is.

My implementation

(in case this may help)

 + (void)trackGoogleTimingInCategory:(NSString *)category withTimeInterval:(NSTimeInterval)time withName:(NSString *)name withLabel:(NSString *)label { // if (![ category isKindOfClass:[ NSString class ] ]) return; NSLog(@"[%@] %@ time=%f (%@)", category, name, time, label); // if (![ name isKindOfClass:[ NSString class ] ]) name = nil; if (![ label isKindOfClass:[ NSString class ] ]) label = nil; // [ [ [ GAI sharedInstance ] defaultTracker ] sendTimingWithCategory:category withValue:time withName:name withLabel:label ]; } 

To calculate the time, I do the same:

 NSTimeInterval timeInterval = [ [ NSDate date ] timeIntervalSinceDate:timeStart ]; 
0
source share

You must wait at least 24 hours for the data to be available on the Google Analytics toolbar if you do not have a GA Premium account:

http://www.google.com/analytics/premium/features.html

0
source share

I had the same issue with the Google Analytics component for Xamarin on iOS, but it worked using NSNumber.FromInt32 :

 var start = DateTime.Now; // do operation var finish = DateTime.Now; var timeElapsed = finish.Subtract (start); GAI.SharedInstance.DefaultTracker .Send(GAIDictionaryBuilder.CreateTiming( "Storage", NSNumber.FromInt32((int)timeElapsed.TotalMilliseconds), "LoadItems", null) .Build()); 
0
source share

All Articles