We increment a user's session count when one of two things happens:
The user has been inactive for more than 30 minutes and then returns.
The user has been active for more than 24 hours.
Note: Visits (for visitors) are incremented in the same way as web sessions.
If you are using our iOS SDK, we increment the iOS session count the first time a user is registered and subsequently on every UIApplicationDidBecomeActiveNotification that is triggered by a user opening your app, once they happen twenty seconds apart. Application opens within twenty seconds are not counted.
Our Android SDK is available here which has similar rules.
Note: Mobile web sessions (i.e., Safari and Chrome on mobile) are captured as web sessions, not mobile sessions.
We increment a company's sessions count whenever a user begins a new session in the context of that company. For example, if a user logs in after 1 day with only user data, this will update the user session.
Then within 30 minutes they ping again with user and company data. This will not increment the user sessions, so it will not increment company sessions either.
So, if while part of a company a particular user has 300 sessions and then that user leaves that company, those 300 sessions will still make up part of the total company sessions, even after they leave.
If a user is associated with multiple companies we don't know which company's sessions to update, unless we have a company_id. So in order for the company's sessions to be updated, the user update has to contain the company object.
Company data must be sent as part of the user ping in order for the company web session to increase.
The “company last seen” value is only updated when the there is a ping request with the user. If your user logs in with just user data, then only ‘last seen’ for the user will be updated, and not ‘company last seen’.