# Goals and events

> Count sign-ups, purchases and other conversions with page and event goals, and see how many of them chatted with the bot first.

## Add a goal

1. Open your bot and go to the **Go live** step.
2. Under **Analytics**, choose **Add a goal**.
3. Give it a name, such as "Signed up", choose **Page** or **Event**, and what it matches.
4. Choose **Save**.

![Analytics on the Go live step: measuring pages, returning visitors and goals](https://aura.oneinfer.ai/docs/images/bot-goals.webp "Go live, Analytics, demo bot")

A bot can have up to 10 goals. Renaming a goal keeps its history.

### Page goals

A page goal counts a visit to a page, such as your thank-you page. `/thanks` covers `/thanks` and the pages under it, such as `/thanks/pro`. A single `/` means just the home page.

### Event goals

An event goal counts when your site calls `window.Aura.track` with its name:

```js
// After a sign-up, with a value if there is one.
window.Aura?.track('signup', { value: 49 });
```

- Names start with a letter, digit or underscore, then letters, digits, spaces and `. : / - _`, up to 64 characters. Case doesn't matter.
- The value is optional, a number such as an order total.
- A call made while the chat is still loading waits for it. `window.Aura` appears when Aura's script starts, so call it with `?.` as above, or add the one-line stub from [Add the chat to your website](https://aura.oneinfer.ai/docs/install#tell-the-bot-who-is-signed-in) to keep calls from the very start of the page.

Events go through the chat's own connection on the page. There's no separate API to send them from a server.

## Read your goals

On the Insights **Overview**, **Goals** shows each goal: how many visits reached it, the share of all visits, and how many reached it after a chat.

![Goals: visits that reached each goal, after a chat and without](https://aura.oneinfer.ai/docs/images/insights-goals.webp "Goals, demo data")

- **After a chat**: the visitor wrote to the bot, then reached the goal on the same visit.
- **Without a chat**: they reached it without chatting first.

**On your site** shows the overall **Conversion rate** and **After chatting**: how visits that chatted converted, beside visits that didn't. It's the clearest measure of what your bot is worth.

**Events your site sent** lists each event with its count and total value.

## Good to know

- A visit reaches each goal once.
- Goals count even when **Measure how your pages are used** is off.
- Events from crawlers aren't counted.
