Skip to content

AnalyticsPinger

Defined in: analytics.ts:91

getEnabled(): Promise<boolean>

Defined in: analytics.ts:107

The current app-level flag, for drawing an opt-out toggle on an options page. Falls back to defaultEnabled (default true) when never explicitly set. Reflects app-level intent only — it does not read Firefox’s technicalAndInteraction browser-level permission, which is a separate second gate checked at ping time (reading it here couldn’t stay in sync across contexts).

Promise<boolean>


maybePing(): Promise<void>

Defined in: analytics.ts:96

Ping if not already pinged today, otherwise no-op. Never throws — analytics must never affect the host. Concurrent calls share a single execution.

Promise<void>


setEnabled(enabled): Promise<void>

Defined in: analytics.ts:98

Persist the enabled flag; when turned on, immediately backfill today’s ping.

boolean

Promise<void>