Astro sites are fast, mostly static and often content-led: docs, blogs, marketing sites for a product. Reveata keeps that spirit: one deferred script in the base layout, no client framework required.
What you get
- Every page counted, including page changes made with view transitions (
<ClientRouter />). - Goals from a
data-reveata-goalattribute in any.astrocomponent, or from a script. - Revenue by page and channel, from payment links on your pages or a checkout endpoint of your own.
- First-party serving through Astro endpoints, your host's rewrites or the managed proxy.
How to install it
In the layout that renders <head> for every page, add:
<script is:inline defer data-website-id="ws_your_tracking_id" src="https://reveata.com/js/script.js"></script>is:inline matters. Astro processes and bundles plain <script> tags, which can move the script or drop its data-* attributes; is:inline leaves it exactly as written. Astro explains this in its client-side scripts guide (opens in a new tab). If you have several layouts, each one that renders <head> needs the snippet, or a shared head component.
Serving it from your own domain
| How the site is deployed | Option |
|---|---|
| With a server adapter (Node, Vercel, Netlify, Cloudflare) | Two endpoints in src/pages: Proxy with Astro |
| Static, on Vercel, Netlify or Cloudflare | The host's rewrites: Proxy through your own server |
| Behind NGINX or Caddy | NGINX or Caddy |
| Anywhere with a custom domain | The managed proxy, one DNS record |
Serving the script from your own domain means fewer visits are lost to ad blockers.
Linking payments to visits
Most Astro sites link to a hosted checkout. Links to Stripe Payment Links and Buy Buttons get the visitor id when clicked, with no code (Stripe Payment Links analytics). If an endpoint of your own creates the checkout, send window.reveata.metadata() with that request and put the two ids into the checkout metadata. With your own billing, use the Payments API.