谷歌分析ios sdk V2.0短会话持续时间

时间:2022-07-15 15:18:38

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.

我正在开发的这款应用在iPad上的零售显示屏上使用。该设备已经自动关闭,应用程序将显示一个视频循环作为一种屏幕保护程序,在一分钟的不活动后。我们正在使用GA iOS SDK 2.0 beta来跟踪会话,会话超时为60秒。该应用程序在启动时启动一个会话,当屏幕保护程序被触摸时也会启动。这一切都很好,除了我们得到的多次0-10秒长会话,平均持续时间为0:00。我们可以启动这个应用程序,通过几个60节的课程,然后将这些课程和2-3个0-10节的课程一起报告。从我看到的这个应用程序只在它应该启动的时候启动会话,所以我想知道这是否与谷歌计算会话的方式有关。我还没有在文档中看到任何解释,我很困惑。

2 个解决方案

#1


2  

Just found this answer from my friend

我刚从朋友那里找到这个答案

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

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.

在我的应用程序中,我只有一个视图控制器使用[tracker trackView:@"my screen name"],我把它粘贴到AppDelegate中。因为我还没开始跟踪视图/屏幕。根据链接的材料,GA计算会话持续时间的方式是基于视图之间的时间。因为我只有一个视图被定义(而且在视图控制器中不正确),这可能就是为什么我有这么多0-10秒的会话。去探索。

#2


0  

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://developers.google.com/analytics/devguides/collection/ios/v3/sessions

#1


2  

Just found this answer from my friend

我刚从朋友那里找到这个答案

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

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.

在我的应用程序中,我只有一个视图控制器使用[tracker trackView:@"my screen name"],我把它粘贴到AppDelegate中。因为我还没开始跟踪视图/屏幕。根据链接的材料,GA计算会话持续时间的方式是基于视图之间的时间。因为我只有一个视图被定义(而且在视图控制器中不正确),这可能就是为什么我有这么多0-10秒的会话。去探索。

#2


0  

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://developers.google.com/analytics/devguides/collection/ios/v3/sessions