Skip to content

Manifest & permissions

Required

Add the storage permission so the SDK can use chrome.storage.local for configuration, an anonymous user id, and any events waiting to send.

json
{
  "manifest_version": 3,
  "permissions": ["storage"]
}

Note

storage is not listed in the install prompt the way broad permissions are (for example site-wide access to websites). You do not add host_permissions for Moderok. Only add those if your extension already needs them for something else.

Background entry

Point background.service_worker at the file where you call Moderok.init() (Initialization).

If you use ES modules in that file, include "type": "module" on the background section when your tooling expects it.

Moderok: analytics for browser extensions