@baukit/analytics-core 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,8 +93,9 @@ analytics.setConsent('denied'); // persist withdrawal and discard every unsent c
|
|
|
93
93
|
`setConsent` is not itself an analytics event. Consent is read synchronously during construction,
|
|
94
94
|
before the first capture is possible. `InMemoryAnalyticsStorage` is the dependency-free default;
|
|
95
95
|
products should inject a small synchronous `AnalyticsStorage` backed by device storage. If the
|
|
96
|
-
platform's native storage API is asynchronous, hydrate a synchronous
|
|
97
|
-
|
|
96
|
+
platform's native storage API is asynchronous, hydrate a synchronous cache before constructing
|
|
97
|
+
the client. On React Native, `HydratedAnalyticsStorage` from
|
|
98
|
+
`@baukit/analytics-posthog-native/storage` is that cache; this package does not ship one. Storage failures fail privacy-safe: unreadable consent becomes
|
|
98
99
|
`unknown`, and analytics methods do not throw because persistence diagnostics fail.
|
|
99
100
|
|
|
100
101
|
Withdrawal clears commands that have not been handed to the transport. A batch already in flight
|