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

[Privacy] Add an option not to persist *anything* outside of session #317

Closed
pcorpet opened this issue Nov 6, 2020 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@pcorpet
Copy link
Contributor

pcorpet commented Nov 6, 2020

Summary

For privacy reasons we'd love to use Amplitude without using any cookies nor local storage.

Motivations

Due to the "Cookie Law" in Europe, a web site or page needs a "cookie approval" before storing anything in a cookie or in a local storage. However it's OK to still log, using amplitude, events and information relative to the website as long as everything stays in RAM. This could be used for the landing page to compute direct conversion even for users who don't approve the use of cookies or local storage.

In terms of implementation, I could provide a PR, if you're OK with the idea: the current implementation already works without using the storage, the storage is only useful when the page is refreshed.

For the moment the way we handle it is to use the disableCookies option and clear the local cache on the callback of every logEvent, however this is suboptimal as some data is still stored and could be kept if the user closes the page before Amplitude server's response. It's also suboptimal because we're basically undoing what the library does, so it would be cleaner not to do it in the first place.

@jooohhn jooohhn added the enhancement New feature or request label Nov 6, 2020
@jooohhn
Copy link
Contributor

jooohhn commented Nov 6, 2020

Thanks for bringing this up

To clarify, would the goal be to have sessionStorage as an alternative storage strategy to cookies and local storage?

@pcorpet
Copy link
Contributor Author

pcorpet commented Nov 6, 2020

I hadn't even thought about sessionStorage which indeed saves on extra usecase (reloading). Maybe we could have a setting called storage or persistance with the following options:

  • cookies (current behavior)
  • localStorage (current behavior with disableCookies set)
  • sessionStorage
  • none (absolutely nothing outside of pure memory).

@jooohhn
Copy link
Contributor

jooohhn commented Nov 9, 2020

Yes those options look good!

pcorpet added a commit to bayesimpact/Amplitude-JavaScript that referenced this issue Nov 11, 2020
@jooohhn jooohhn closed this as completed in 1a56a9b Dec 9, 2020
github-actions bot pushed a commit that referenced this issue Jan 6, 2021
# [7.4.0](v7.3.3...v7.4.0) (2021-01-06)

### Features

* **privacy:** Add `storage` option ([#320](#320)) ([1a56a9b](1a56a9b)), closes [#317](#317)
* Added Fbclid config option ([#338](#338)) ([f52288a](f52288a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants