-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: add in-client sessionization #37
Comments
@alexanderdean will there ever be a way of setting a session index on Android? |
Hi @n-belokopytov - yes it will be done, not yet scheduled however. |
Depends on snowplow/iglu-central#180 |
Hey @alexanderdean so just to make sure I understand what needs to be done here. We want a custom context included with each event that includes the userId, a session id, the previous session id and the session index. The session should be created along with Tracker creation and the session should be incremented at a configurable timed interval after an event: so if an event has not been sent in say 15 minutes update the session. I also presume that the userId in the session needs to match the userId currently in the Subject; should we then only make a session if the userId has already been set in the Subject so there is something to match against? |
Hey Josh, that's a good summary:
Yes, pending confirmation from @yalisassoon and @bogaert on the exact fields.
Correct, although if you look at the sister iOS ticket, session termination will likely also include something around application backgrounding/foregrounding.
No, these are orthogonal. The userId in the Subject is developer-created, whereas this userId is automatically generated by the tracker. The userId in the session is meant to be equivalent to the JS Tracker's domainUserId. |
Okay cool! So the UserId should be created once per Tracker creation for X amount of sessions? |
Yes the userId should be common across all sessions, same as the domainUserId. |
No worries, and with the backgrounding/foregrounding; should that be an instant new session if the app is brought back into focus or is there a timer for that as well? |
I think that should be time based too... |
Sorry - only just seen this ticket so apologies for not jumping in earlier. In terms of the fields we want to generate and capture, having the session What's the user ID in this context? Is it a new ID that we're generating? On Tue, Jul 7, 2015 at 3:45 PM, Alexander Dean [email protected]
Co-founder |
For the mobile trackers, the userId is a new synthetic ID completely owned When the JS Tracker starts using this context, this userId will be
|
That's really cool. From a data modeling perspective it'll be nice having a single user ID field, generated by different Snowplow trackers that can be used for off-the-shelf queries. |
Agreed. This will make it much easier to have a single model that does both web and mobile. |
Great! |
With the userId.. should this be persistent for the life of the application being installed on a device? Currently if the user were to close the app and re-open it there would be a new userId for any session contexts sent from that device. Not sure if this is something we want but I think it could be nice to stitch user sessions across multiple open and closes of an app? |
Hey @jbeemster - yes definitely, the userId should persist as long as is possible (i.e. forever barring app uninstall or other storage deletion), certainly across app restarts... |
Okay I will figure out a way to add in some level of persistent storage linked to the application. |
We have persistent storage for the event queue already no? |
We do yes. But potentially a DB table is a bit of overkill for a few kV pairs. I am instead going to store it as a file in the internal storage. This gets wiped if you uninstall the app. Should do the trick! |
Sounds good @jbeemster ! |
This ticket should track the implementation done here: snowplow/snowplow-ios-tracker#83
The text was updated successfully, but these errors were encountered: