Chrome Extension Analytics and User IDs: Should You Send an Account ID?
6 min readModerok team
What a Chrome extension analytics user ID really is, what Chrome's user data policy makes of a signed-in account ID, and three patterns that avoid sending one.
Short answer: keep the user ID in your Chrome extension analytics anonymous, and do not pick a tool on whether it has an identify() call. Chrome's Web Store user data FAQ lists "any type of identification number, such as a government issued number, driver's license number, or account number" among its examples of user data, so an account ID raises the stakes of every rule on that page rather than starting a new one: disclosure duties attach to analytics either way. Almost every account-level question you have is answerable without it, and the next three patterns are how.
TL;DR: Disclose your analytics either way, then keep two systems. Your own backend already knows the account, so measure account-level behavior there, on the requests the extension already makes. Let the extension analytics SDK stay anonymous and answer the extension-shaped questions your backend cannot see: installs, updates, uninstalls, daily actives, retention, and errors in a service worker that never called you. If you need a split by plan, put a coarse tier in the event name, not an account ID in a property.
What a "user id" means in Chrome extension analytics
The phrase does double duty, so be precise. In Moderok's SDK the userId on every event is a random UUID: createUuid() calls crypto.randomUUID() when it exists, falls back to a hand-rolled v4 generator otherwise, and the id is minted once, stored with chrome.storage.local, and mirrored into chrome.storage.sync. The privacy page says the same: a random anonymous id per extension profile, no cookies, no fingerprinting, and no PII collected by the SDK itself.
There is also no identify(), alias(), or setUserProperties() in the API. The documented methods are init(), track(), flush(), shutdown(), isInitialized(), captureError(), and captureLastError() (API reference), and none of them takes an identity you supply. That is a design choice, and the policy text below is most of the reason.
One detail matters for the account math later: when chrome.storage.local has no id yet, the SDK reads chrome.storage.sync and reuses the id it finds there before minting a new one. Since sync follows the signed-in browser profile, the id is pinned neither to one device nor to one person.
What Chrome's policy makes of a signed-in account ID
The Chrome Web Store user data FAQ is the page to read before you wire an account ID into anything. Its examples of user data include "Personally identifiable information (including a person's name, address, telephone number, email address, and username. It also includes any type of identification number, such as a government issued number, driver's license number, or account number)" and, separately, "Authentication information (such as logins, password, and authentication cookies)". So an account ID, the email you signed the user in with, and the session token are all on the regulated side of the line.
Three consequences follow (none of this is legal advice):
- A privacy policy is required. The FAQ answers even the local-only version directly: an extension that "only stores information locally (or only uses Chrome Storage Sync API)" still needs one.
- Disclosure has to be in your UI. The FAQ says "You must present the disclosure in a prominent way, so that the user sees it prior to agreeing", that it "must not be located only in a privacy policy, terms of service, or similar document", and that "The prominent disclosure and consent must occur within the Product's user interface."
- The transfer itself is constrained. The Limited Use policy allows transferring user data to third parties "If necessary to providing or improving your single purpose", and clause 3 limits collection to data "necessary for the extension's disclosed single purpose, including related operational purposes, such as maintaining, securing, or measuring the performance and reliability of those features."
That last clause is the one people misread as a ban on analytics: measuring reliability is named as an operational purpose. What is hard to argue is that shipping a billing identifier to a third party was necessary for it.
A related trap: chrome.identity.getProfileUserInfo() "Retrieves email address and obfuscated gaia id of the user signed into a profile" and "Requires the identity.email manifest permission" (identity reference). An easy stable per-user key, and also a Google account email. Do not put it in an event.
Pattern 1: keep the join on your own backend
If a feature calls your API with an auth token, you already have account-level usage data, cleaner than anything an analytics SDK could hand you: no queue, the real account row, joinable to the subscription. Count it there.
What your backend cannot see is everything that happens without a request to you. The install. The update. The uninstall. The user who opened the popup four days running and never triggered a network call. The service worker that threw before it reached your endpoint. That is the half an SDK exists for, and none of it needs an account ID.
Pattern 2: a coarse tier in the event name, not an ID in a property
If the real question is "do paying users use the export button more", you need a two-bucket split, not identity:
import { Moderok } from "@moderok/sdk";
const { licenseTier } = await chrome.storage.local.get("licenseTier");
const tier = licenseTier === "pro" ? "pro" : "free";
Moderok.track(`export_clicked_${tier}`);
Event names, not properties, because Moderok's custom event counts are per event name. An event carries your properties and a separate SDK-built context (SDK version, extension ID and version, browser, OS, locale, source), and neither becomes a chart breakdown. A plan property is preserved and visible on each event in the logs, but it will not draw you two lines.
Keep the buckets coarse and few. free and pro describe a plan; a seat count, team name, or customer ID describes a customer, and you are back in the previous section.
Pattern 3: a pseudonymous key, and why it rarely pays
The usual suggestion is to hash the email and send that. A hash is stable enough to re-identify, which is what makes it useful and what makes it an identifier: anyone holding the same email can recompute it. You would pass it as a property on every track() call, visible on each event to everyone with dashboard access.
The narrow case is support: a user reports a bug and you need their error events. Even then a short random token, minted per account and shown in your own options page, is the better trade, because you can rotate it and it means nothing to anyone who has not seen your database.
Account math will still not reconcile
Suppose you do send an account ID. Your counts still will not match. The SDK only mints an id when chrome.storage.local has none and chrome.storage.sync has none to recover. Chrome's storage reference says that for the sync area, "If the user enables syncing, the data syncs with every Chrome browser that the user is logged into", so one person's second machine inherits the first id, while a profile signed into a different account, a different browser, or a profile with syncing off gets a new one. A shared profile produces one id for two people. Lifecycle events know nothing about your accounts either: Chrome's runtime reference says onInstalled fires "when the extension is first installed, when the extension is updated to a new version, and when Chrome is updated to a new version", and nothing replays the events a user generated before they signed up. If reconciling store numbers with your own is the goal, how many users does my Chrome extension have covers why those figures diverge on their own, before accounts enter the picture.
Before you ship either design
Declare what you collect in the Chrome Web Store dashboard's privacy practices, and keep the declaration, your privacy policy, and your actual behavior in agreement. The FAQ is blunt about mismatches: discrepancies "would be a violation" and "can result in the suspension of all the items owned by the publisher". What your extension must declare walks through the form.
Moderok is built around this split: the SDK is 5.7 kB gzipped with zero runtime dependencies, assigns a random anonymous id, and sends installs, updates, daily actives and errors with no account ID in them, with uninstall attribution one opt-in option away. The privacy page lists exactly what it stores, and the product page shows what it measures.