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.

Installation

Add the script to your base layout:
src/layouts/Layout.astro
---
interface Props {
  title: string;
}
const { title } = Astro.props;
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>{title}</title>
    <script defer data-site="YOUR_SITE_ID" src="https://revlytics.co/script.js"></script>
  </head>
  <body>
    <slot />
  </body>
</html>
Astro uses is:inline for scripts that should not be bundled. However, since this is an external script with defer, it works without is:inline.

View Transitions

If you’re using Astro’s View Transitions, Revlytics automatically detects navigation changes via pushState — no extra configuration needed.

Track events

<button id="cta" data-revlytics-event="cta_click" data-revlytics-prop-page="home">
  Get Started
</button>