Replayful
Sign inGet started

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

AttributeRequiredNotes
srcYesAlways https://app.replayful.co/api/t.js.
data-siteYesProject-specific key from the Install tab. Don't reuse across projects.
asyncRecommendedLoads 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 sendBeacon on tab close / hide so trailing events survive.
  • Idle-pauses after 5 minutes of no activity, hard-stops after 30.
  • Respects Do-Not-Track header, 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.