AnalyticsOptions
Defined in: analytics.ts:56
@extport/sdk/analytics — the daily ping client. The wire protocol has a single event: install/update/active/departure are all inferred server-side from the ping stream (extport docs/analytics-design.md).
Same principle as licensing’s heartbeat: no alarms, no permissions required, purely event-driven (the background waking is itself proof of activity). At most once per UTC day, deduplicated independently on client and server.
Properties
Section titled “Properties”apiBase?
Section titled “apiBase?”
optionalapiBase?:string
Defined in: analytics.ts:65
For local/self-hosted debugging; defaults to the production extport.
defaultEnabled?
Section titled “defaultEnabled?”
optionaldefaultEnabled?:boolean
Defined in: analytics.ts:82
Initial value before setEnabled is ever called; defaults to true (installing the integration is itself the tenant’s decision). Extensions needing a user-level consent flow pass false and call setEnabled(true) once consent is obtained.
extensionId?
Section titled “extensionId?”
optionalextensionId?:string
Defined in: analytics.ts:63
The extport extension id (ext_…). Optional: resolved automatically when
the @extport/wxt module injects globalThis.__EXTPORT__.extensionId. If
neither is present, silently report nothing (analytics must never affect
the host); warn once in dev.
storage?
Section titled “storage?”
optionalstorage?:StorageAdapter
Defined in: analytics.ts:73
Storage backend for installId / lastPingDate / enabled state. Defaults to
browser.storage.local when available (requiring the storage manifest
permission), falling back to idb-keyval.
storageKey?
Section titled “storageKey?”
optionalstorageKey?:string
Defined in: analytics.ts:75
Storage key; defaults to ‘extport-analytics’.
version?
Section titled “version?”
optionalversion?:string
Defined in: analytics.ts:67
Defaults to runtime.getManifest().version.