Angular apps are often business software with sign-ups, trials and paid plans. Reveata adds traffic and revenue analytics without a service to inject or a router subscription to write.
What you get
- Every route counted. The Angular Router changes pages through the History API, which the script follows.
- Goals from templates, including bound values, or from components.
- Revenue attribution by sending the visitor id with your checkout request.
- Local runs left out:
ng serveonlocalhostis ignored unless you adddata-allow-localhost="true".
How to install it
Paste the snippet before </head> in src/index.html. ng build keeps the tag in the built index.html, with server-side rendering too. If you use HashLocationStrategy (URLs like /#/settings), add data-hash="true" to the tag. Angular's routing options are documented at angular.dev (opens in a new tab).
Goals in templates and components
Templates accept the attribute as it is:
<button data-reveata-goal="signup">Sign up</button>For a value that changes, bind it: [attr.data-reveata-goal-plan]="plan". From a component, call the script:
(window as any).reveata?.('goal', 'signup');See custom goals for properties and naming rules.
Linking payments to visits
Connect your payment provider in Reveata, then send window.reveata.metadata() with the HTTP request that creates the checkout. It returns { reveata_visitor_id, reveata_session_id }, or {} in cookieless mode. Your backend copies those keys into the checkout's metadata, and the payment is credited to the visit under your attribution model. Provider by provider:
| Provider | Where the ids go |
|---|---|
| Stripe | Checkout Session or PaymentIntent metadata |
| Polar | Checkout metadata |
| Dodo Payments | Checkout metadata |
More in connect a payment provider and Stripe revenue analytics.