Going further
Goals & events
Pageviews are automatic. Everything else — signups, trials, demo bookings — is a goal you fire yourself, and each one can be measured by the revenue it eventually produces.
Firing a goal
js
window.numberhill.goal("signup");
// with metadata
window.numberhill.goal("trial_started", { plan: "pro", seats: 3 });Without writing JavaScript
Any click on an element carrying data-numberhill-goal fires automatically — the script delegates from document, so it works for elements added later.
html
<button data-numberhill-goal="pricing_cta">Start free trial</button>Identifying users
Once someone signs up you can attach traits to the visitor, which is what turns an anonymous row in the live view into a name in the customer journey.
js
window.numberhill.identify({
email: "[email protected]",
name: "Maya K.",
plan: "pro",
});Same visitor, whole history
Identify doesn't create a new person — it labels the existing visitor ID, so their earlier anonymous pageviews stay attached to the journey.The window.numberhill API
numberhill.visitorId()— the current visitor ID, for checkout metadata.numberhill.goal(name, meta?)— record a conversion event.numberhill.identify(traits)— attach who this visitor is.
Guard your calls
If the script is blocked,window.numberhill is undefined. Optional chaining — window.numberhill?.goal("signup") — keeps analytics from ever breaking a flow.Funnels
Funnels are ordered lists of steps built from the events you already send — a pageview path, a goal name, or a payment. Define them in the dashboard; no extra instrumentation needed once the goals exist.
example funnel
Visited site pageview
Viewed pricing pageview:/pricing
Signed up signup
Started trial trial_started
Paid payment