Skip to content

Uninstall tracking

When enabled, the SDK sets chrome.runtime.setUninstallURL() to a Moderok URL so an uninstall can be attributed to the same anonymous user.

js
Moderok.init({
  appKey: "mk_your_app_key",
  trackUninstalls: true,
  uninstallUrl: "https://yoursite.com/goodbye",
});
  • trackUninstalls: turn the feature on.
  • uninstallUrl (optional): where to send the user after the ping, if your server supports it.

The uninstall URL length limit in Chrome is 1023 characters. If the built URL is too long, the SDK logs a warning when debug: true.

If you do not need uninstall attribution, leave trackUninstalls off (default).

Moderok: analytics for browser extensions