FirstMRRHelp Center
Developers

Developers: overview and keys

How FirstMRR receives your data: the script and apps with a public key, your server with a secret key.

1 min read

Two keys

KeyRoleDescription
pk_…Public keyIdentifies your site or app in the script and in apps. It is visible in your code: it is not a secret, it only lets events be sent, filtered by domain for a site.
sk_live_…Secret keyFor your server only (server events API). Shown once when created, kept on our side as a hash. 5 active keys at most, each tied to your site or your app.

Both are in Distribution → Tracking, "For developers" section. Create one key per environment or service, give it a name, and revoke it as soon as it is no longer used or may have leaked: it is refused from the next request.

Three ways to send data

  • The script on your site: visits, origin, conversions declared in the browser. See JavaScript snippet reference.
  • Your mobile app: a small module that sends opens and conversions. See Mobile apps.
  • Your server: conversions only your backend knows (a payment confirmed by a webhook, a cancellation). See Server events API.

And, to tie a paying customer to their video, the origin your product writes on the payment: see Payment provenance.

Base URLs

URLMethodDescription
https://firstmrr.app/api/v1/eventsPOSTServer events, authenticated by a secret key.
https://firstmrr.app/app/api/collectPOSTScript and app events, identified by the public key.
https://firstmrr.app/app/t.jsGETThe measurement script.
https://firstmrr.app/go/<slug>GETThe tracked links redirect.