Have your extension open this Refermate page once, when it is installed:
https://refermate.com/app-installed/<app-public-key>?install=<uuid>&v=<version>&b=<browser>install: a new ID from crypto.randomUUID(). Keep it, and send it to your own server, which reports the install with it as install_id.v: your extension's version, up to 32 letters, digits, dots, + and -. URL-encode it with URLSearchParams or encodeURIComponent: a bare + in a query string reads as a space, and the version is dropped.b: chrome, edge, firefox or safari, the store this build ships to.// Your extension's background service worker.
chrome.runtime.onInstalled.addListener(({ reason }) => {
if (reason !== "install") return;
const installId = crypto.randomUUID();
// Keep installId and send it to your server, which reports the install.
const page = new URL("https://refermate.com/app-installed/<app-public-key>");
// searchParams encodes each value, so a + in the version stays a +.
page.searchParams.set("install", installId);
page.searchParams.set("v", chrome.runtime.getManifest().version);
page.searchParams.set("b", "chrome"); // chrome, edge, firefox, safari
void chrome.tabs.create({ url: page.href });
});runtime.onInstalled when reason is install. Safari fires it only when the person turns your extension on in Safari's settings, which can be long after the download.install ID once. The page never bills, and anything invalid is ignored.Google Play passes the click to your app in its install referrer, as rm_click=<click id>. On first launch, start a background job that reads the referrer with Google's Play Install Referrer library (com.android.installreferrer:installreferrer), takes rm_click from it and keeps it. The job sends it to your server until your server confirms it, then forgets it. Wait for Google Play's answer before sending: if Play can't answer yet or a send fails, the job tries again. Your server reports events with it as click_id.
The App Store passes nothing to your app, so you carry the click yourself. In Partners, add an iOS landing page on your site. It gets rm_click in its address. Carry it through your web sign-up, or a sign-in link that opens your app, to your server. Your server reports events with it as click_id. Without a landing page, iPhone and iPad installs can't be credited. SKAdNetwork and AdAttributionKit aren't supported.
Have your extension open this Refermate page once, when it is installed:
https://refermate.com/app-installed/<app-public-key>?install=<uuid>&v=<version>&b=<browser>install: a new ID from crypto.randomUUID(). Keep it, and send it to your own server, which reports the install with it as install_id.v: your extension's version, up to 32 letters, digits, dots, + and -. URL-encode it with URLSearchParams or encodeURIComponent: a bare + in a query string reads as a space, and the version is dropped.b: chrome, edge, firefox or safari, the store this build ships to.// Your extension's background service worker.
chrome.runtime.onInstalled.addListener(({ reason }) => {
if (reason !== "install") return;
const installId = crypto.randomUUID();
// Keep installId and send it to your server, which reports the install.
const page = new URL("https://refermate.com/app-installed/<app-public-key>");
// searchParams encodes each value, so a + in the version stays a +.
page.searchParams.set("install", installId);
page.searchParams.set("v", chrome.runtime.getManifest().version);
page.searchParams.set("b", "chrome"); // chrome, edge, firefox, safari
void chrome.tabs.create({ url: page.href });
});runtime.onInstalled when reason is install. Safari fires it only when the person turns your extension on in Safari's settings, which can be long after the download.install ID once. The page never bills, and anything invalid is ignored.Google Play passes the click to your app in its install referrer, as rm_click=<click id>. On first launch, start a background job that reads the referrer with Google's Play Install Referrer library (com.android.installreferrer:installreferrer), takes rm_click from it and keeps it. The job sends it to your server until your server confirms it, then forgets it. Wait for Google Play's answer before sending: if Play can't answer yet or a send fails, the job tries again. Your server reports events with it as click_id.
The App Store passes nothing to your app, so you carry the click yourself. In Partners, add an iOS landing page on your site. It gets rm_click in its address. Carry it through your web sign-up, or a sign-in link that opens your app, to your server. Your server reports events with it as click_id. Without a landing page, iPhone and iPad installs can't be credited. SKAdNetwork and AdAttributionKit aren't supported.