Skip to main content

install

Analytics for Remix, in one tag

A 1.2 KB core, no cookies and no stored IP. Replace YOUR_TOKEN with your site token to measure visits and sources, and connect Stripe, Lemon Squeezy, Paddle, or the revenue API to see the revenue behind them.

  1. Copy your site token

    It is in Dashboard → Settings → Install, inside the snippet. Before launch, you get a dashboard once we pick your account for the beta.

  2. Paste the snippet

    Once, in a place every page loads. Replace YOUR_TOKEN with your token.

    Remixapp/root.tsx
    export default function App() {
      return (
        <html>
          <head><Meta /><Links /></head>
          <body>
            <Outlet />
            <script defer src="https://api.getvero.dev/t.js?s=YOUR_TOKEN" />
            <Scripts />
          </body>
        </html>
      );
    }

    Drop the tag into root.tsx before <Scripts />.

  3. Deploy and open your site

    Vero counts visits to your domain and its subdomains, so a localhost test never shows up. With the snippet live, open your site in another tab: your dashboard notices the first visit by itself.

Where the tag goes in app/root.tsx

app/root.tsx renders the html document for every route in a Remix app, so a tag there reaches every page. Place it inside the body, before <Scripts />, as the snippet shows. It is a plain script element with defer, not a component you import.

Remix navigates with React Router, which updates the URL through the History API instead of loading a new document. The SPA module hooks into that when the script loads and sends a pageview whenever the path or the query changes, so a click on a Link counts like a full load. Without SPA, only the first page of each visit is a pageview.

Loaders and actions run on the server, where window.vero does not exist, so revenue attribution happens in the browser. The checkout module adds the visit to Stripe Payment Links and Lemon Squeezy checkout links by itself. With Paddle.js, pass customData: { vero: window.vero.session() } from client code when you open the checkout.

Troubleshooting

window.vero is undefined in my component

Remix renders components on the server first, and there is no window there. Call window.vero.track or window.vero.session only from code that runs in the browser, such as an event handler or an effect. The script loads with defer, so check that window.vero exists before you call it.

My data is not showing up

Frequently asked

Why inside the body and not in the head?

That is where the snippet places it, next to the rest of the app's scripts. It loads with defer either way, so it never blocks rendering.

How do I count a form submission as a conversion?

Call window.vero.track with an event name when the form submits, then create a goal on that event. The goal gives you its conversion rate.

IntegrationsPricing

After the tag

Hand-picked beta, waitlist open

Ask for a place in the beta.

Anyone can join the list. The accounts we pick get Pro free for the whole beta.

By joining you agree to receive launch updates and accept our Privacy Policy.

See the demo