Skip to main content

Track method

After the tracker script loads, OpenRevenue exposes window.openrevenue.track(). Call it with a short event name when a meaningful action succeeds.
app.ts

Identify

After a visitor signs in, call identify with your product’s stable user id (never an email or name). OpenRevenue hashes the value with SHA-256 in the browser and attaches it to later events as identified_id in event properties. Pass null to clear. In the default storage-free mode the hash is kept in memory only, so call identify on every page load while the visitor is signed in. When a visitor ID is stored, the hash is also kept in localStorage as _ova_uid.
app.ts
Do not pass emails, names, phone numbers, or other personal data. Use an opaque account id from your own system. Identify is optional. Mention it in your privacy policy if you use it. Calling track right after identify is safe — the tracker waits for the hash before sending.

Examples

Track the moment that matters, not every click. For forms, call OpenRevenue after validation and the server action both succeed.
checkout.tsx
pricing.tsx

Naming

Use lowercase, predictable names such as signup, download_report, or contact_submit. Avoid dynamic values like email addresses, order IDs, or full URLs in event names.
If you need to compare events over time, treat event names like API names: stable, short, and boring.

Where to see events

Custom events appear in your project analytics and count toward monthly usage alongside pageviews. Pings, outbound links, transactions, and performance events are tracked separately and do not count toward monthly event usage.