# Track goals

> A goal is anything you want more of: a page visit, a click, a scroll, or a custom event. Set one up with or without code.

Section: Get started  
Canonical page: https://statsy.co/docs/getting-started/goals  
Last updated: 2026-09-15

A goal is a conversion you care about: a sign-up, a demo request, a download, a plan upgrade. Once a goal exists, every breakdown in Statsy gains a conversions column, so you can see which channel, page and campaign actually produces them.

## The five kinds of goal

| Kind | Fires when | Code needed |
| --- | --- | --- |
| Pageview | Somebody visits a page. Match by path, by wildcard such as `/thanks*`, or by exact match. | None |
| Click | Somebody clicks an element matching a CSS selector you enter in the dashboard. | None |
| Scroll | A visitor reaches a scroll depth you set, as a percentage of the page. | None |
| Outbound | Somebody clicks a link to another site. | None |
| Event | Your code calls `statsy.goal('name')`, or a clicked element carries `data-statsy-goal`. | A little |

## Create a goal without writing code

1. Open GoalsIn the site you want to measure, go to **Goals** and add a goal.
2. Give it a name and a kindName it for the thing that happened, not the page it happened on: *Signup*, not */thanks*. Then pick the kind from the table above.
3. Set a default value, if it has oneA goal can carry a default value, which is useful when you know roughly what a demo request or a trial start is worth. Real money still comes from [payments](https://statsy.co/docs/revenue), not from goal values.

## Track an event from your code

For anything the dashboard cannot see on its own — a form that submits over fetch, a step inside an app — call the event yourself and create a goal of the *event* kind with the same name.

```js
statsy.goal('signup', { plan: 'pro' });

// Before the script has loaded, queue the call:
window.statsyq = window.statsyq || [];
statsyq.push(['goal', 'signup', { plan: 'pro' }]);
```

Properties are optional and can be strings, numbers or booleans. The same thing works straight from HTML, with no JavaScript at all:

```html
<button data-statsy-goal="signup" data-statsy-prop-plan="pro">Start free</button>
```

> **Note.** Some events are recorded with no setup at all: outbound link clicks as `outbound`, file downloads as `download`, and clicks on hosted checkout links as `checkout_start`. Scroll depth is recorded per page. Each can be turned off with a script attribute.

## What to do with a goal

- Open a goal to see its breakdown: which sources and pages drive it.
- Filter any report by goal to see only the visitors who converted, or build a [funnel](https://statsy.co/docs/features/funnels) that ends on it.
- Get a message the moment it fires with a goal [alert](https://statsy.co/docs/getting-started/alerts).

Full detail, including goals created through the API and from the CLI, is in [Goals](https://statsy.co/docs/features/goals).

Previous: [Install the script](https://statsy.co/docs/getting-started/install)  
Next: [Connect payments](https://statsy.co/docs/getting-started/revenue)