Analytics
2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Is session count being misreported due to background services?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

We recently introduced some changes to our apps (Android and iOS) that include running some services in the background, that are triggered either via the app due to user interaction (i.e. started app, time to sync with server, or pull-to-refresh, etc), or via an external event such as receiving a push notification via GCM. I believe that the latter scenario is causing sessions to be reported even though the user is not actually interacting with the app (we're syncing their information in background), as we are seeing a huge number of less than 5 second-long sessions (many only a second or two in length). I'd expect some number of users do in fact accidentally open our app, but these numbers are so large they're skewing our session duration numbers and making them artificially low.

My question is, how does Google Analytics calculate sessions? Is my hypothesis even remotely right, in that these background services could be messing up our session numbers? If so, is there anything I can do to stop having the SDK report these "false" sessions? The tricky thing is that I cannot always end a session (or turn off session reporting) just because one of these services start up, because many of them are ran while the user is interacting with the app and are in fact triggered by user interaction, but not exclusively so.

Thanks in advance for your help and insight into this matter.

Re: Is session count being misreported due to background services?

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Hey Chantell,

Interesting documentation on this. According to the developer page on sessions:

"By default, Google Analytics will group hits that are received within 30 minutes of one another into the same session. This period is configurable at the property level."

https://developers.google.com/analytics/devguides/collection/ios/v3/sessions

This would mean that perhaps timeout settings have been changed to allow shorter period to be allowed through as sessions.

Does this help?

Ali

Re: Is session count being misreported due to background services?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Ali,

Thanks for the quick reply! So I read that as well, but we haven't changed the session timeout from the default 30 minutes.

For full disclosure, the thing that made us start suspecting this is that I recently released a version of the app into the wild with a bug in the code that would start a background service anytime the network connectivity of the user changed to sync with the server. Note it did not start the app itself, and the user did not see or interact with the app, but we went from ~70 active users at a time to ~2000 active users at a time per Google Analytics, and our session duration dropped significantly. We got pretty excited until we realized we skewed the results accidentally with that particular bit of code. Now we're wondering if the background services we use (not that one anymore, we ripped it out) are still impacting the stats, because we're still seeing 30% of our sessions reporting < 10 seconds in duration with an average in that category of 2 seconds. It's not as drastic as it was with the bug (60% reporting at < 10 seconds with an average of 1 second in duration), but it still seems wrong.

Re: Is session count being misreported due to background services?

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
Can you filter out sessions where no screen was viewed? It's been a while since I saw a GA account for an app but if the same thing was happening on a site I'd look at filtering and segmenting to see where it was coming from.

I had a client who complained about GA numbers not matching server level numbers, but I had to point out that the server stats count every HIT - every file, script, css file - so I believe the same thing can happen with a user's session on an app.

Are there new assets being loaded in the new app? And are you using GTM or the Analytics SDK?

Re: Is session count being misreported due to background services?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Okay so, I did as you suggested and compared the number of sessions < 10 seconds in duration with more than one screen versus ones with 0 screens. 58.6% of the sessions less than 10 seconds in duration have no screens associated with them. Even on the most recent version (with that bug fixed), it's showing 18.5% of the < 10 second sessions are ones with no screen views (and we're still very early in the analytics as that version was only released last Friday). For comparison, the number of "misreported" sessions with 0 screen views for session durations > 10 seconds is a fraction of a percent. You can see how this is skewing our numbers pretty heavily.

By "new assets", what do you mean? These background services are used to update the app's database, but they don't bring in any new images or anything like that (conceivably they could be < 1 second in compute time). We're using the Analytics SDK from Google Play Services version 9.0.0.

Re: Is session count being misreported due to background services?

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆
Hmm I would say it could be something that analytics itself can't reveal.

Nothing in the crashes report in analytics?
Have you configured events and do the number of events per users quite large?

Ali

Re: Is session count being misreported due to background services?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Yeah, I was hoping the SDK devs might be able to shine some light on the logic they have around what determines a "session". If it's just the start of the lifecycle for the Application object, it makes sense that we're getting invalid session reporting.

I actually don't use GA for crash reports; I use Crashlytics. We're holding at a steady 99.5% crash-free users according to Crashlytics and none of those are related to analytics in any way.

We have events in place, but not an excessive number (we still have plans to flesh that out). We're at an average of 10 events per session per user.

By off chance, if it's not the background service causing the session count, could an event hit done in background be causing a session count?

Thanks,
Chantell

Re: Is session count being misreported due to background services?

Explorer ✭ ✭ ☆
# 8
Explorer ✭ ✭ ☆
Not being a developer I couldn't say, but from working at a mobile casino I know my first thought would be "no way Google is doing that - that's something on our end making that happen"