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.
User opt-out
Users can opt out of all tracking programmatically:
// Opt out — stops all tracking
revlytics.optOut();
// Opt back in
revlytics.optIn();
Opt-out state is stored in localStorage under the key revlytics_ignore. When set to "true", the script exits immediately on page load.
Cookie consent integration
Integrate with your consent manager by conditionally loading the script:
// Only load Revlytics if user has consented
if (userHasConsented()) {
const script = document.createElement("script");
script.defer = true;
script.setAttribute("data-site", "YOUR_SITE_ID");
script.src = "https://revlytics.co/script.js";
document.head.appendChild(script);
}
Or use the opt-out mechanism after the script is loaded:
// In your consent manager callback
onConsentChange((consent) => {
if (!consent.analytics) {
revlytics.optOut();
} else {
revlytics.optIn();
}
});
What data is collected
| Data | Collected | Stored |
|---|
| IP address | Used for geolocation | Geo only (country, region, city) |
| User agent | Parsed for browser/OS | Browser name, OS name |
| Page URL | Full URL | Path, hostname |
| Referrer | Full referrer URL | As-is |
| Screen size | Dimensions | Width, height, viewport, pixel ratio |
| Language | Browser language | As-is |
Cookies used
| Cookie | Purpose | Duration |
|---|
_rvl_vid | Visitor identifier | 365 days |
_rvl_sid | Session identifier | 30 minutes (sliding) |
localStorage keys
| Key | Purpose |
|---|
revlytics_ignore | Opt-out flag |
_rvl_uid | Identified user ID |
Iframe blocking
By default, tracking is disabled when your page is embedded in an iframe. This prevents analytics from being triggered by third-party embeds. Override with data-allow-iframe.
GDPR considerations
- Revlytics uses first-party cookies only — no third-party tracking
- No fingerprinting techniques are used
- Users can opt out at any time via
revlytics.optOut()
- Self-hosting gives you full data ownership and control
- Data can be deleted via the admin API (coming soon)