Tracker script
Reference for the Replayful tracker tag: attributes, behaviour, masking, and how to verify what the page sent.
Tag signature
<script src="https://app.replayful.co/api/t.js"
data-site="YOUR_SITE_KEY"
async></script>Attributes
| Attribute | Required | Notes |
|---|---|---|
src | Yes | Always https://app.replayful.co/api/t.js. |
data-site | Yes | Project-specific key from the Install tab. Don't reuse across projects. |
async | Recommended | Loads the tracker without blocking parsing. |
Behaviour
- Captures rrweb events: DOM snapshot, mutations, mouse, scroll, viewport, touch.
- Buffers events in memory and flushes every few seconds.
- Falls back to
sendBeaconon tab close / hide so trailing events survive. - Idle-pauses after 5 minutes of no activity, hard-stops after 30.
- Respects
Do-Not-Trackheader, visitors with DNT on are not recorded.
Masking
All inputs are masked by default, the tracker initialises rrweb with maskAllInputs: true. Form text, search queries, textarea content, password fields all never leave the browser.
To force-mask a non-input element (e.g. a div displaying a customer name), add the data-rr-mask attribute:
<div data-rr-mask>Jane Doe</div>
Bundle size
23 KB gzipped over the wire (~70 KB minified before compression). Served from our edge, so first-byte latency stays low globally.