google analytics ios sdk V2.0 short session durations

别说谁变了你拦得住时间么 提交于 2019-12-06 18:09:53

问题


The app I'm working on is used on an iPad in a retail display. The device has auto-lock turned off, and the app will show a video loop as a type of screensaver after a minute of inactivity. We are using the GA iOS SDK 2.0 beta to track sessions, with a session timeout of 60 seconds. The app starts a session on startup, and also when the screensaver is dismissed by a touch. This is all working fine except for the multiple 0-10 second long sessions we get, with average duration of 0:00. We can start the app, go through a couple of 60 sec. sessions, then get those sessions reported along with 2-3 of the 0-10 sec. sessions. From what I can see the app only starts sessions when it is supposed to, so I'm wondering if this is related to how Google calculates a session. I haven't seen anything in the documentation that explains this and I'm stumped.


回答1:


Just found this answer from my friend

http://support.google.com/analytics/bin/answer.py?hl=en&answer=1144430&topic=1011345&ctx=topic

In my app I only have one view controller that uses [tracker trackView:@"my screen name"] and I have this stuck this in the AppDelegate.m for now as I hadn't got around to tracking views/screens yet. According to the linked material, the way GA calculates session duration is based on time between views. Since I only have one view defined (and not properly within the viewController), this may be the reason I'm getting so many 0-10sec sessions. Going to explore.




回答2:


It might possible you are initiating a new session before tracking a event/pageview. Please Ensure that you are not starting new session everytime. Refer this link https://developers.google.com/analytics/devguides/collection/ios/v3/sessions



来源:https://stackoverflow.com/questions/13766486/google-analytics-ios-sdk-v2-0-short-session-durations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!