Skip to content
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

turnstile event localStorage cleaning #7602

Closed
andrewharvey opened this issue Nov 20, 2018 · 2 comments
Closed

turnstile event localStorage cleaning #7602

andrewharvey opened this issue Nov 20, 2018 · 2 comments

Comments

@andrewharvey
Copy link
Collaborator

Following up on @scottgerring's question at #6980 (comment) ...

@asheemmamoowala if you're using temporary access tokens which are fresh for each user session, recurring users can quite easily gather quite a few of these localStorage items per day, as the days go on this will just keep growing.

Not only that but it looks like under the current implementation Mapbox will see those as new unique users when actually they are recurring users.

What if instead of using the access token as the localStorage key you only use the account username of the access token?

@scottgerring
Copy link

scottgerring commented Nov 26, 2018

+1. I can't imagine it's ever going to "fill" local storage doing this, but it seems unnecessary and wasteful to orphan elements into it indefinitely, and it makes working with local storage as a developer of mapbox applications (at least) a little more unpleasant.

@asheemmamoowala
Copy link
Contributor

under the current implementation Mapbox will see those as new unique users when actually they are recurring users.

The actual count of unique users is calculated using the turnstile event data and ignores multiple requests from the same userId within a certain period. So extra events being sent will not adversely affect any "MAU" type statistics.

What if instead of using the access token as the localStorage key you only use the account username of the access token?

This would help with the proliferation of items in the local storage but not help with the extraneous requests being sent when the access token changes frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants