Skip to content

For developers ​

Replora has three surfaces for developers: the tracking script that runs on your visitors' pages (with a small command queue, window.__sr, and npm packages for apps), the versioned REST API under /api/v1 that the dashboard itself uses, and the module system that the whole server application is built from.

2 minutesDevelopersSingle user · SaaS

Tracking ​

Server ​

Extending and building ​

Quick example ​

The tracking code, then a few commands from your own pages:

html
<script async src="https://replora.example.com/t.js" data-site="YOUR_SITE_KEY"></script>
<script>
  window.__sr = window.__sr || [];
  __sr.push(['identify', '[email protected]', { plan: 'pro' }]);
  __sr.push(['tagSession', { cart_value: 129 }]);
  __sr.push(['event', 'signup', { plan: 'pro' }]);
</script>

Read the sessions back from a script with a token:

sh
curl https://replora.example.com/api/v1/sites/1/sessions?per_page=5 \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Your site key and server address

Both are on the website's Install page in the dashboard (Websites › your site › Install). The snippet there is already filled in.

How the pieces talk ​

PieceTalks toHow
Tracking script (/t.js) on your pages/c/{key}, /i/{key}, /s/{key}, /x/{key} on your Replora serverPublic CORS requests without cookies; see what the script sends
Dashboard (React)/api/v1/…Same-site session cookie (Sanctum)
Mobile app, scripts, other servers/api/v1/…Authorization: Bearer <token>
AlertsYour email, Slack, your webhook URLSigned JSON POST, see webhooks

Replora: see what your visitors see.