amplitude / amplitude/Amplitude-TypeScript

Ability to add custom identity storage provider in @amplitude/analytics-browser@v2.0.0

Offen
#448 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
180
Forks
68
Ø Merge
3 T. 1 Std.
Gemergte PRs (30 T.)
29

Beschreibung

## Summary
The `cookieStorageProvider` property was removed in v2.0.0 of the Browser SDK, so this blocks us from being able to specify a custom storage provider for GDPR compliance purposes. It would be amazing if the SDK provided this type of functionality out of the box (e.g. `switchIdentityStorage`) or added a `custom` option to `identityStorage` so folks can provide custom storage providers again.

## Motivations
For GDPR compliance, we would like to track users using memory storage and then switch to cookies only after users have provided their consent to use tracking cookies. We were able to do this in `@amplitude/analytics-browser@v1.0.0` by creating a custom `Storage` instance (https://github.com/MystenLabs/sui/blob/main/apps/core/src/utils/persistableStorage.ts) and using that for the `cookieStorageProvider` property. We're aware of the default recommended solution of deferring the initialization of Amplitude until users have provided consent, but that isn't quite the same and we miss out on potentially useful insights.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.