Skip to content
By role

Analytics for developers

3 min read · Updated · By the Reveata team

Short answerDevelopers want analytics that are quick to install, do not break the page, and can be driven from code and the terminal. Reveata has a script tag and npm packages, a JavaScript API, server-side events and payments, a first-party proxy, signed webhooks, a REST API, a CLI and an MCP server, all reading the same numbers.

A developer is often the one asked to "add analytics" and the one who has to keep it working. The good version is short to install, never throws into the page, survives single-page navigation and ad blockers, and can be queried without opening a dashboard.

What developers usually need to do

  • Install tracking in a framework without hurting performance.
  • Record sign-ups and other actions, some from the browser and some from the backend.
  • Make sure payments are linked to visits, across domains and devices.
  • Keep tracking working behind ad blockers and a strict Content Security Policy.
  • Give product and marketing their numbers without building reports.

The tools

Need Where
Install A defer script tag, or the npm packages (@reveata/tracker, @reveata/next). Guides for Next.js, React, Vue, SvelteKit, Astro, Laravel, Django and more
Goals from the browser reveata('goal', name, props) or data-reveata-goal attributes. See the JavaScript API
Goals from the server The events command and API, with the visitor id from the browser
Payments Checkout metadata from reveata.metadata(), or the Payments API for in-house billing
Users identify after sign-in, reset on log out
First-party serving Managed proxy with one DNS record, or your own proxy
CSP The exact directives in Content Security Policy
Push Signed webhooks for payments, refunds, goals, alerts and a daily summary
Pull The REST API, the CLI and the MCP server

Single-page apps are handled: the script records a pageview on every pushState, replaceState and back or forward navigation. Hash routes can be counted as pages too.

A sensible setup

  1. Install with the guide for your framework and verify the installation.
  2. Proxy the script through your own domain.
  3. Pass reveata.metadata() into checkout creation on the server. The revenue attribution guide has code per provider.
  4. Call identify on sign-in and reset on log out.
  5. Send goals that are confirmed on the server (email verified, first API call succeeded) from the backend, so they cannot be faked from the browser.
  6. Add exclusions for staging hosts and your own IP. Pages on localhost and 127.0.0.1 are ignored already, unless the snippet has data-allow-localhost="true".

What to keep an eye on

  • The visitors per day drop below alert, which catches a removed snippet or a broken deploy.
  • Why events don't show up, which lists every reason an event can be skipped or dropped.
  • Unattributed payments; a rising share often means the checkout stopped passing the visitor id.

Honest limits

  • No call throws into your page, but goals sent before the script loads are lost unless you add the queue snippet.
  • Navigation started from code (window.location) to another domain carries no cross-domain id; use reveata.decorate(url).

Frequently asked questions

Can I type-check goal names?

The npm packages export typed functions (goal, trackGoal). Goal names themselves are free text: lowercase letters, digits, _, - and :, up to 64 characters.

How do I verify webhook signatures?

Each delivery carries Reveata-Signature, a hex HMAC-SHA256 of the timestamp and raw body keyed with the endpoint's secret. The webhooks guide has the steps.

Can I test locally?

Yes. Local pages are ignored by default; add data-allow-localhost="true" to the snippet while you test. The Vite proxy guide shows the proxied snippet in a local dev server.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
Use caseAnalytics for affiliate and partner managersAffiliate and partner managers need to see which partners bring paying customers, not just clicks. Reveata puts visits from ?via= links and affiliate UTM tags in their own Affiliate channel, credits payments and renewals to the partner that brought the customer, and can send each attributed payment to your server.Use caseAnalytics for content marketersContent marketers need to show which pieces bring customers, not just readers. Reveata credits sign-ups and revenue to the article that started the visit, shows scroll depth and time on page for every page without setup, and connects Google Search Console keywords to the revenue they lead to.Use caseAnalytics for foundersA founder needs analytics that answer "what is working?" in a few minutes, with money in the answer. Reveata puts revenue, customers and revenue per visitor next to every channel and page, sends a Monday summary, and alerts you to payments, cancellations and drops, so you spend your week on what brings customers.Use caseAnalytics for freelance web designersFreelance web designers need analytics they can set up quickly on any client site, explain in one page, and hand over cleanly. Reveata installs on WordPress, Webflow, Framer, Squarespace, Wix and most frameworks, shows clients enquiries and revenue by source, and lets you transfer a website, with its history, to the client.Use caseAnalytics for growth marketersGrowth marketers need to judge every channel and experiment by the customers and revenue it brings, not by clicks. Reveata ranks channels, campaigns and landing pages by revenue, customers and revenue per visitor, lets you switch attribution models, and shows which funnel step loses the most people from each source.Use caseAnalytics for investors reviewing tractionInvestors reviewing traction want numbers they can read themselves, not screenshots. With Reveata a founder can share a read-only, password-protected link that expires, showing visitors, channels and, if they choose, revenue and new customers taken from the connected payment provider.