Skip to content

assertStoragePermissionForAnalytics

assertStoragePermissionForAnalytics(manifest): void

Defined in: index.ts:94

analytics: true requires the storage permission — browser.storage.local backs installId persistence in @extport/sdk/analytics. A hand-rolled IndexedDB open (the idb-keyval fallback used when storage isn’t declared) has more that can go wrong at creation time than a plain key-value store, confirmed against a real incident: a corrupted keyval-store database silently stopped installId from ever persisting, so every ping minted a fresh one (87% of recorded “installs” were one-off, never a returning user) — and nobody noticed until someone happened to cross-check the numbers against the store console weeks later. Throws rather than warns: a warning that’s easy to ignore is how this shipped silently the first time.

Record<string, unknown>

void