DocsMeasure
Custom events and goals
Count signups, purchases and anything else, then make them goals.
Send an event
After the script has loaded, call:
Names are short and plain: signup, start_trial, Book a call. Up to 120 characters. pageview and engagement are reserved.
Add details
Pass a few short details as props. Never personal data: no names, emails or account numbers.
Add an amount
Put the amount in revenue, in normal units (48.00, not 4800). Without a currency it uses the site’s currency.
For subscriptions, connecting Stripe is better: it knows about trials, renewals and cancellations.
Without writing code
Mark a button, link or form, and a click or submit sends the event:
Add data-outbound or data-downloads to the script tag to count clicks on links to other sites, or on files, without marking anything.
Before the page changes
When an event fires just before the page navigates away (a form that posts), pass a callback. It runs once the event is sent, or after a second at most.
Before the script loads
Calls made before the script has loaded can wait in a queue. Put this line above the script tag:
Turn it into a goal
In your site, open Goals → Add a goal and pick the event by name, or a page:
| Pattern | Matches |
|---|---|
/thanks | Exactly that page |
/blog/* | One level: /blog/hello, not /blog/2026/hello |
/shop/** | Anything under /shop, at any depth |
A goal that sums amounts shows revenue beside its conversions. Funnels chain two to eight goals or pages in order, within a visit or within a day.