Custom events, goals & revenue

Track signups, purchases and any custom event with properties and revenue, then build goals and funnels on top.

Everything on this page needs the Numative tracker, so it applies to standalone sites. Sites in GA4 mode show a notice instead of the Goals, Funnels and Properties tabs.

Sending events

The snippet exposes a global numative() function. Call it with an event name, and optionally with properties and revenue:

js
// Just a name
numative("Signup")

// With properties (string, number or boolean values)
numative("Signup", { props: { plan: "growth", trial: true } })

// With revenue; currency is optional
numative("Purchase", { revenue: { amount: 19.99, currency: "USD" } })

Events are sent with navigator.sendBeacon (falling back to fetch with keepalive), so calls in click handlers survive the page unloading. The function never throws, even if the network is down.

Property limits

Properties are sanitized on the server before storage:

  • At most 30 properties per event; extra keys are dropped.
  • Keys and values are truncated at 300 characters.
  • Values must be strings, numbers or booleans (numbers and booleans are stored as strings). Nested objects and arrays are dropped.

Automatic events

Two events are tracked with no code at all (disable them with data-outbound="false" on the snippet):

  • Outbound Link: clicks on links to another hostname, with the destination in a url property.
  • File Download: clicks on same-site links ending in pdf, zip, csv, xls, xlsx, doc, docx, ppt, pptx, dmg, exe, mp4, mp3 or wav, also with a url property.

Goals

A goal turns an event or a pageview into a tracked conversion. Create them under your site's Goals tab:

Goal typeMatchesExample
Custom eventEvents with this exact nameSignup
PageviewPageviews whose path matches; globs allowed/thanks/*

Each goal reports unique converting visitors, total goal events, the conversion rate (converting visitors over all visitors in the window), and summed revenue when the underlying events carry a revenue amount. Goals respect the dashboard's filters and segments, so you can compare conversion by source, country or any other dimension.

Funnels

Funnels chain multiple steps, where each step is a page path (globs allowed) or an event name. Steps must be completed in order within a visit, and the report shows unique visitors reaching each step plus the drop-off between steps. Build them under the site's Funnels tab, for example: pageview /pricing, then event Signup, then event Purchase.

Custom properties report

The Properties tab breaks events down by any property key you have sent (plan, method, variant, and so on), with visitors, events and revenue per value. Property keys are discovered automatically from the selected date range, and property breakdowns can also be used as filters across the dashboard.