Skip to content

About

Lightweight analytics SDK for Manifest V3 browser extensions

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

@moderok/sdk

Lightweight analytics and error tracking for Manifest V3 browser extensions. Zero runtime dependencies, built for service workers and every extension context.

Constraint Detail
Size 5.7 kB gzipped (5,720 bytes, minified)
Permissions "storage" only — no host_permissions required
Environments Service worker, popup, options, side panel, content scripts
Error tracking On by default for uncaught errors and unhandled rejections

Install

npm install @moderok/sdk

Quick start

import { Moderok } from "@moderok/sdk";

Moderok.init({ appKey: "mk_your_app_key" });
Moderok.track("feature_used", { theme: "dark" });

Call init() at top level in your background service worker — synchronously, not after await or inside .then(). Make sure "storage" is listed in your manifest.json permissions.

A standalone moderok.min.js is also available under dist/ via jsDelivr for extensions without a bundler.

Documentation

Full documentation at docs.moderok.dev — manifest setup, API reference, error tracking, uninstall tracking, and troubleshooting.

License

MIT — see LICENSE.

About

Lightweight analytics SDK for Manifest V3 browser extensions

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages