Developers: overview and keys
How FirstMRR receives your data: the script and apps with a public key, your server with a secret key.
Two keys
| Key | Role | Description |
|---|---|---|
pk_… | Public key | Identifies 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 key | For 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
| URL | Method | Description |
|---|---|---|
https://firstmrr.app/api/v1/events | POST | Server events, authenticated by a secret key. |
https://firstmrr.app/app/api/collect | POST | Script and app events, identified by the public key. |
https://firstmrr.app/app/t.js | GET | The measurement script. |
https://firstmrr.app/go/<slug> | GET | The tracked links redirect. |