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 root.tsx:
app/root.tsx
import {
  Links,
  Meta,
  Outlet,
  Scripts,
  ScrollRestoration,
} from "@remix-run/react";

export default function App() {
  return (
    <html lang="en">
      <head>
        <Meta />
        <Links />
        <script
          defer
          data-site="YOUR_SITE_ID"
          src="https://revlytics.co/script.js"
        />
      </head>
      <body>
        <Outlet />
        <ScrollRestoration />
        <Scripts />
      </body>
    </html>
  );
}

Client-side navigation

Remix’s client-side transitions are automatically tracked. No additional setup is required.

Track events

export function SubscribeButton() {
  return (
    <button
      onClick={() => window.revlytics?.track("subscribe", { tier: "pro" })}
    >
      Subscribe
    </button>
  );
}