Skip to main content

Documentation Index

Fetch the complete documentation index at: https://revlytics.co/docs/llms.txt

Use this file to discover all available pages before exploring further.

Usage

Configuration is done via data-* attributes on the script tag:
<script
  defer
  data-site="YOUR_SITE_ID"
  data-no-replay
  data-replay-sample-rate="50"
  src="https://revlytics.co/script.js"
></script>

Available options

AttributeTypeDefaultDescription
data-sitestringrequiredYour site ID from the dashboard
data-endpointstringautoCustom API endpoint URL (for self-hosted or local dev)
data-no-replayflagDisable session replay recording
data-replay-sample-rate0-100100Percentage of sessions to record replay
data-allow-localhostflagEnable tracking on localhost
data-allow-iframeflagEnable tracking when embedded in an iframe
data-skip-patternsJSON[]URL patterns to skip entirely
data-mask-patternsJSON[]URL patterns to anonymize
data-allowed-hostnamesstringComma-separated domains for cross-domain tracking
Flag attributes don’t need a value — just their presence enables the feature. For example, data-no-replay (not data-no-replay="true").

Custom endpoint

For self-hosted instances or local development:
<script
  defer
  data-site="YOUR_SITE_ID"
  data-endpoint="https://analytics.yourdomain.com"
  src="https://revlytics.co/script.js"
></script>
The endpoint should be the base URL — the script automatically appends /api/event and /api/replay.

Local development

By default, the script doesn’t track on localhost, 127.0.0.1, or *.local domains. To enable local tracking:
<script
  defer
  data-site="YOUR_SITE_ID"
  data-allow-localhost
  src="https://revlytics.co/script.js"
></script>