Skip to content

Conversation

@djih
Copy link
Member

@djih djih commented Mar 18, 2016

If a user opens multiple tabs, then multiple SDK instances will be created, each maintaining its own session and event state. Each will write new values to the shared cookie, but never reloads from the cookie. As a result, the sessions and events from multiple windows can be not in-sync. An easy fix would be the always reload the cookie before logging an event, so the event will have the most update-to-date session and id. Incrementing the event id in one window should increment it for the others, etc. If one window is still maintaining the same session through activity, then no new sessions should be started in the other windows.

@djih djih self-assigned this Mar 18, 2016
djih added a commit that referenced this pull request Mar 18, 2016
@djih djih merged commit 8ec2c4e into master Mar 18, 2016
@djih djih deleted the sync_across_windows branch March 18, 2016 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants