AnalyticsPinger
Defined in: analytics.ts:91
Methods
Section titled “Methods”getEnabled()
Section titled “getEnabled()”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).
Returns
Section titled “Returns”Promise<boolean>
maybePing()
Section titled “maybePing()”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.
Returns
Section titled “Returns”Promise<void>
setEnabled()
Section titled “setEnabled()”setEnabled(
enabled):Promise<void>
Defined in: analytics.ts:98
Persist the enabled flag; when turned on, immediately backfill today’s ping.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
Returns
Section titled “Returns”Promise<void>