Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS : Google Analytics User Timing report is not updated in my Google Analytics Account

I am trying to track my app speed using Google analytics but i could not see anything under app speed in my google analytics account. I have tracked the other parameters like events,crashes and exceptions. For those parameter am able to see the reports generated in my google analytic account. Following is the code what i am using to send event timing.

 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");   
 }

Following is the message printed in the console.

GoogleAnalytics 2.0b4 -[GAIDispatcher dispatchComplete:withStartTime:withRetryNumber:withResponse:withData:withError:] (GAIDispatcher.m:415) DEBUG: Successfully dispatched hit /GAIHit/p479 (0 retries).

Provide me any sample code if u have. Please help me in that. Thanks in advance.

like image 408
M Vignesh Avatar asked Feb 19 '13 07:02

M Vignesh


People also ask

How long does it take for Google Analytics to show data?

Data processing latency Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days.

Why is my Google Analytics not showing data?

You've turned on the User-ID feature in your view settings but haven't configured it. User-ID tracking needs an additional code implementation and if it's not done, your Google Analytics view will contain no data.

What is User Timing Google Analytics?

User timings parametersThe number of milliseconds in elapsed time to report to Google Analytics (e.g. 20 ).

What is default period of time for Google Analytics reports?

You can choose how long Analytics retains data before automatically deleting it. The maximum amount of time that Analytics will retain Google-signals data is 26 months, regardless of your settings. By default, Google signed-in data expires after 26 months.


1 Answers

I found that the interval had to be a whole number. It's expecting 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 should see results. To convert I used (GA V3)

[tracker send:[[GAIDictionaryBuilder createTimingWithCategory:category interval:@((int)(interval * 1000)) name:name label:label] build]]
like image 75
nh32rg Avatar answered Oct 20 '22 19:10

nh32rg