Track custom goals

Learn how to track specific user actions — signups, newsletter subscriptions, checkout starts — with a one-line JavaScript call or no-code goal definitions in your dashboard.

Why track goals

statiz records pageviews automatically. Goals are everything beyond that — the actions that actually matter to your business: a signup, a newsletter subscribe, an initiate_checkout, a file download.

  • Understand what visitors actually do on your site.
  • Unlock the Journey tab — see the steps each visitor took before completing a goal.
  • Build conversion funnels and light up the Conversion rate tile on your main chart.

You can track goals two ways: with a one-line JavaScript call, or with no code at all by defining goals in your dashboard.

Track goals with JavaScript

Call statiz.event() with the name of your goal, wherever the action happens:

1<!-- Fire wherever the action happens: a button click, a form submit,2     or a "thank you" page after signup -->3<script>4  statiz.event("signup");5</script>

Rules for goal names:

  • Use lowercase letters, numbers, underscores (_) and hyphens (-) — e.g. signup, newsletter_subscribe. Up to 128 characters; short names read best in the dashboard.
  • exit-link is reserved — statiz's own outbound-link tracker uses it and it's excluded from goals everywhere.
  • Repeated fires from the same visitor don't inflate your numbers — statiz counts distinct visitors per bucket, not raw events.

Nothing else to configure: every custom event name that appears in your data shows up automatically as a goal in the Goals card.

Goal tab

🎯signup12

Define goals without code

Some goals need no tracking call at all. In your dashboard's Goals card, the + button opens a create dialog with two match types:

  • Custom event — a name to match (same as the JavaScript method; useful for renaming an existing event goal with your own emoji).
  • Page visit — a URL path pattern with * wildcards. The classic example: point it at /welcome* — the page users only see right after signing up — and you have a signup goal without touching a single line of code.

No-code goals appear in the Goals card even with zero completions so you can watch them start filling up, and they can be deleted again from the same card.

Viewing goals in statiz

  1. Open the Goals card — every goal is a row with its completion count; search filters the list, the sliders button opens Goal visibility (choose which goals appear in the chart), and clicking a goal highlights its line.
  2. Switch to the Journey tab — pick any goal from the selector to see the visitors who completed it and the steps they took. The built-in Payment goal is the default: paying visitors, with each payment marked by a red dot on their timeline.
  3. Build a funnel — chain 2–8 goals into an ordered sequence and watch where visitors drop off.
  4. Watch the Conversion rate tile on the main chart — the share of visitors who completed at least one goal.
To track completed payments, use revenue tracking instead of custom goals — it attributes each sale to the paying visitor and handles refunds. See Track revenue.