Custom events and properties
Track signups, purchases and other custom events with privatus.track(), HTML attributes or your server, plus naming rules, limits and how events count as usage.
A custom event is something that happens on a page: a signup, a purchase, a video play. Events have a name and optional properties.
privatus.track('Signup', { plan: 'pro', seats: 3 })
Events appear in the Conversions panel on the Overview and in the Events explorer, and can become goals and funnel steps.
Three ways to send them:
- JavaScript:
privatus.track()(API). - HTML attributes, no code:
data-privatus-event="Signup"(HTML attributes). - From your server: the server-side ingest API.
The auto module tracks
outbound links, downloads, forms and 404s for you.
Naming#
- Up to 120 characters, any language and script. Longer names are cut.
- Leading and trailing spaces are trimmed and Unicode is normalised (NFC),
so
Cafétyped two different ways is one event. - Case is kept for display. Pick one style and stick to it:
Signupandsignupare stored as written. You can merge names later in Site settings → Events & properties. - Name the action, not the element:
Signup,Checkout started,Invoice downloaded, rather thanBlue button click. - Don't put variable data in names (
Viewed product 123). Use a property.
Limits#
| Limit | Value |
|---|---|
| Event name | 120 characters |
| Properties per event | 30 (extra ones are dropped) |
| Property key | 64 characters, a-z, 0-9, _ |
| String value | 500 characters |
| Array value | up to 30 strings |
| Property keys per site | 10 on Free, unlimited on paid plans |
| Request body | 32 KB |
Usage#
Every custom event counts as one event toward your monthly allowance, like a pageview. Engagement pings, Web Vitals, click-map hits and bots don't count. See What counts as an event.
Managing events#
In Site settings → Events & properties you can rename events (history is rewritten at query time), merge several names into one, hide events, and delete an event including its history. See Events explorer.
Add typed custom event properties (strings, numbers, booleans and arrays) to events and pageviews, see how keys are normalized and query them with prop filters.
Revenue tracking for custom events: attach an amount and ISO 4217 currency, report it in your site currency with ECB rates, and record refunds.
Track clicks and form submissions as custom events without writing JavaScript, using data-privatus-event and data-privatus-prop HTML attributes on any element.
Copy-paste event tracking for signups, checkout funnels, file downloads, outbound links, 404 pages, scroll milestones, video, A/B tests and user plans.