Skip to content

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.

optional apiBase?: string

Defined in: analytics.ts:65

For local/self-hosted debugging; defaults to the production extport.


optional defaultEnabled?: 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.


optional extensionId?: 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.


optional storage?: 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.


optional storageKey?: string

Defined in: analytics.ts:75

Storage key; defaults to ‘extport-analytics’.


optional version?: string

Defined in: analytics.ts:67

Defaults to runtime.getManifest().version.