Skip to content

Moderok vs Google Analytics for Chrome Extensions: One Was Built for This

4 min readModerok team

Google Analytics wasn't built for Chrome extensions. Moderok was. A head-to-head on setup, dashboards, privacy, and price, with a clear winner.

Here is the thing nobody tells you about using Google Analytics for Chrome extension analytics: Google's own tag cannot run inside your extension. At all. The snippet that takes two minutes on a website takes a weekend of custom plumbing in a Manifest V3 extension, and at the end of it you get a dashboard about page views. Your extension does not have page views.

Moderok is analytics built only for browser extensions. Install the package, add the storage permission, and initialize it; installs, active users, and errors are then instrumented automatically.

That is the whole comparison, honestly. But let's make it official.

TL;DR: GA4 is free and famous, but it was built for websites and refuses to run inside an MV3 extension without a pile of do-it-yourself code. Moderok has a small, explicit MV3 setup, tracks the metrics extensions actually need, and has a free tier that covers 1 million events a month. Building an extension? Moderok wins.

The 30-second comparison

ModerokGoogle Analytics 4
Built for browser extensionsYes: And nothing elseNo: Built for websites
Runs in an MV3 service workerYes: NativelyNo: You code it yourself
SetupInstall SDK, add storage, initializeHTTP client, identity, queue, and reports
Installs, actives, and update counts out of the boxYes: Default chartsNo: Custom reports you build
Automatic install, update, and error eventsYesNo: Hand-coded
Identity defaultRandom profile id; properties are yoursDepends on your configuration
Handles service worker restartsPersists retryable failures with a capped queueYou build and operate the queue
PriceFree to 1M events a monthFree, plus your weekends

Round 1Getting it running

Paste the normal GA snippet into an extension and it simply does not work. The background service worker has no page for it to attach to, and Chrome bans loading remote scripts. This is not a configuration issue, it is a hard wall, and we wrote the autopsy in why Google Analytics doesn't work in a Chrome extension.

Google's official answer is the Measurement Protocol: a bare HTTP endpoint. You write the client. You invent and store the user id. You build an event queue that survives Chrome killing your service worker every 30 idle seconds, or you silently lose data all day.

After installing @moderok/sdk and adding "storage" to your manifest permissions, initialize it in the background worker:

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

Moderok.init({ appKey: "mk_your_app_key" });

Done. Install, update, first open, daily active, and error events start tracking themselves.

Winner

Moderok, by a mile.

Round 2The dashboard you actually look at

Open GA4 after wiring all that up and it greets you with landing pages, traffic sources, and bounce rates. All empty. Every number you care about, installs, daily actives, version adoption, is a custom exploration you get to build and maintain.

Moderok opens on the questions extension developers ask every morning. How many installs this week? How many analytics profiles were active today? Did update volume change? What just broke? Charts on top, granular logs underneath, in one place.

Winner

Moderok. GA4 speaks website. Your extension doesn't.

Round 3Privacy and the Chrome Web Store

Every extension fills out the Chrome Web Store's data disclosure form, and your analytics decides how uncomfortable that form gets. GA4 is a general-purpose tracking system with a hundred switches, and it is on you to configure it conservatively and disclose it correctly.

Moderok assigns a random profile id and has no identify() API. Custom event properties are still yours, so passing an email address, page URL, or other sensitive value changes what you collect and disclose. Keep those properties minimal and make your disclosure form match the data you actually send.

Winner

Moderok. Boring disclosure forms are a feature.

Round 4Price

GA4 is free. Moderok is free up to 1 million events a month, then $29 for 10 million, $149 for 100 million, every feature on every tier.

So GA4 wins on sticker price. Now add the weekend you spend building the Measurement Protocol client, the queue, the retries, and the custom reports, plus every future weekend you spend maintaining them. "Free" is doing a lot of heavy lifting in that sentence.

Winner

Call it a draw on dollars. Count your hours and it flips hard.

Where GA4 actually wins

If you are running Google Ads and need extension events inside Google's attribution machine, GA4 has a real claim. That is the use case. If that sentence does not describe you, it is a website tool you would be fighting for sport.

The final score

Four rounds, one tool that was actually built for the job. Google Analytics can be forced to accept extension events if you bring enough duct tape. Moderok just works, because the entire product exists for browser extensions and nothing else.

Ready to see your numbers? The free tier covers 1 million events a month and works even with an unpublished local build. Start at moderok.dev.