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.
JavaScript API
Use therevlytics.track() method to send custom events:
Examples
HTML attributes
Track events declaratively without writing JavaScript:data-revlytics-event attribute specifies the event name. Additional properties are passed via data-revlytics-prop-* attributes.
The attribute tracker walks up the DOM tree to find the closest element with
data-revlytics-event. This means you can place the attribute on a parent container.Command queue
If you need to track events before the script loads, use the command queue:Validation rules
| Rule | Limit |
|---|---|
| Event name | Lowercased, max 50 characters |
| Properties per event | Max 20 |
| Property value length | Max 255 characters |
| XSS protection | <>'"&, javascript:, on*=, data: URIs are stripped |
Auto-tracked events
In addition to custom events, Revlytics automatically tracks:- Button clicks —
<button>,role="button",<input type="submit"> - Form submissions —
<form>submit events with form metadata - Copy events — Text copied to clipboard (up to 500 chars)
- External links — Clicks on links to other domains
- JavaScript errors — Uncaught errors and unhandled rejections