Originally published on ExtensionBooster.
A rate us button looks trivial until you ship the same code to more than one store. If the link is hardcoded, some users will land on a listing they never installed from. This post shows how to make the button open the right store every time, and how to test it.
Why a hardcoded review link breaks
Publishing one codebase to the Chrome Web Store, Edge Add-ons and Firefox Add-ons gives you three separate listings.
- Each store assigns its own ID. An extension can have one ID on Chrome and a different one on Edge. Firefox uses the ID you declare in
browser_specific_settings.gecko.id. - Ratings do not carry over. Chrome reviews never show up on Edge Add-ons, and the reverse is also true.
- The browser does not tell you the store. Edge can install builds from the Chrome Web Store, so an Edge user may be running your Chrome build.
Sending that user to Edge reviews would pad a listing they never used and leave the one they did use untouched.
Detect the store by extension ID, not by browser
The running build already knows who it is. Read runtime.id, look it up in a small table, and open the matching review page.
| Build | Where it runs | Opens |
|---|---|---|
| Chrome Web Store build | Chrome, Brave, Opera, Edge | Chrome Web Store reviews |
| Edge Add-ons build | Edge | Edge Add-ons listing |
| Firefox build | Firefox | Firefox Add-ons listing |
| Unpacked dev build | Any (random ID) | Browser-based guess |
Only unknown IDs, such as unpacked development builds, should fall back to a browser check. For that fallback, read navigator.userAgentData, then the user agent string, and default to Chrome.
Review URL formats
- Chrome Web Store:
https://chromewebstore.google.com/detail/EXTENSION_ID/reviewsopens the reviews section. Adding/my-reviewopens the review form. - Edge Add-ons:
https://microsoftedge.microsoft.com/addons/detail/EXTENSION_ID. The short form without a name slug resolves to the same listing. - Firefox Add-ons:
https://addons.mozilla.org/firefox/addon/YOUR_SLUG/. Appending/reviews/shows existing reviews.
A minimal shared module
Keep the store map in one file so the popup, options page and onboarding all use the same logic. This is a sketch; fill in your own IDs.
// store.js const api = globalThis.browser ?? globalThis.chrome; const STORES = { "CHROME_ID": "https://chromewebstore.google.com/detail/CHROME_ID/reviews", "EDGE_ID": "https://microsoftedge.microsoft.com/addons/detail/EDGE_ID", "firefox@example.com": "https://addons.mozilla.org/firefox/addon/YOUR_SLUG/", }; function fallbackUrl() { const brands = navigator.userAgentData?.brands ?? []; const ua = navigator.userAgent; if (brands.some(b => /Edge/i.test(b.brand)) || /Edg\//.test(ua)) { return "https://microsoftedge.microsoft.com/addons/detail/EDGE_ID"; } if (/Firefox\//.test(ua)) return "https://addons.mozilla.org/firefox/addon/YOUR_SLUG/"; return "https://chromewebstore.google.com/detail/CHROME_ID/reviews"; } export const reviewUrl = () => STORES[api.runtime.id] ?? fallbackUrl(); A few implementation notes:
- Render a real
<a href>in the popup, so keyboard users, middle-click and "copy link" all work. - Opening a tab does not need the
tabspermission. - Storing the click (time, surface, store) needs the
storagepermission, which shows no install warning. - WXT or Plasmo can inject the URL per store at build time, but keep the ID check as a safety net.
When to show the button
- Keep a small, always-available link in the popup footer or options page. Do not gate features behind it or open it automatically.
- Ask after success, for example around the fifth completed action or after about a week of use, not at install.
- Store "No thanks" and wait a long time before asking again, because repeated prompts tend to produce negative reviews.
Test matrix
Test the packaged store builds, not only the unpacked one.
- Chrome Web Store build in Chrome opens Chrome Web Store reviews.
- Chrome Web Store build in Edge still opens Chrome Web Store reviews.
- Edge Add-ons build in Edge opens the Edge Add-ons listing.
- Firefox build in Firefox opens the Firefox Add-ons listing.
- Unpacked build in each browser opens a reasonable store.
- Keyboard only: Tab to the link, press Enter, and the correct page opens.
Write the expected URL for each case into your release checklist, since regressions often appear after popup refactors.
Replying to reviews, by store
- Chrome Web Store: reply from the reviews section of the developer dashboard.
- Edge Add-ons: use Partner Center, under Extension overview, then Reviews. Replies must be 1 to 1,000 characters.
- Firefox Add-ons: sign in as the developer, open the review and choose "Reply to this review."
Key takeaways
- Every store has its own listing, ID and reviews.
- Detect the store from
runtime.id; Edge can run Chrome Web Store builds. - Use a browser check only for unpacked or unknown builds.
- Test every store build in every browser it runs in.
For the full walkthrough with more detail, read the guide on building a rate us button that opens the right extension store. If you are working on reviews more broadly, ExtensionBooster's resources for extension developers are a good next stop.
Have you ever been sent to the wrong store by a rate us button, and how did you fix it in your own extension?
