> For the complete documentation index, see [llms.txt](https://docs.uxwizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uxwizz.com/guides/goals.md).

# Goals

Goals show how many sessions match a behavior, such as visiting a checkout page or receiving a purchase tag. Compare the conversion rate across your active segments.

![Goal cards comparing All sessions with the High intent segment](https://2006615411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ltuu0c63_YY4iXfi5vJ%2Fuploads%2Fgit-blob-db0e74f9802f80c06010db24a249f96c53283a12%2Fuxwizz-goals-v10.webp?alt=media)

## What can you use goals for?

* **Conversion rates:** use a purchase tag as the goal and **All** as the active segment.
* **Traffic-source comparisons:** keep the same goal and compare segments for search, direct visits, or a campaign.
* **A/B tests:** compare the goal across the variant tags from an [A/B test](/guides/a-b-testing.md).
* **Multi-step behavior:** combine page and tag filters to count sessions that include all required actions. This does not, by itself, prove that the actions happened in a particular order.

## Creating a goal

1. Use the plus button in the segment header to **Create new segment**, or open an existing segment you own.
2. Add the filters that describe the goal, such as a visited page or tag.
3. Open the segment menu and select **Convert segment to goal**.
4. Open **Stats** to see the goal card for the active segments and date range.

A goal can be converted back with **Convert goal to segment** when you need to edit its filters. You can also copy it as a new segment.

Goals and saved segments are stored on your UXWizz server. Use **Availability** to choose the domains and dashboard users that can use a saved filter. Sharing a filter does not grant access to a domain's analytics data. Available options depend on your license and account permissions.

**Older installations, including 8.5.0:** goals and segments were stored in browser `localStorage`. The original workaround for keeping separate sets was to open the same dashboard through different hostnames, such as `stats.domain1.com` and `stats.domain2.com`. Each origin gets separate browser storage. This needs DNS, virtual-host, and HTTPS configuration for both names; it does not back up the filters or share them across browsers. Current installations can use **Availability** instead.

## How the goal value is calculated

For each active segment, UXWizz counts sessions that match the combined segment and goal filters. It divides that count by the number of sessions in the active segment.

```
Conversion rate = matching goal sessions / active segment sessions × 100
```

The active segment supplies the report's date range. A goal adds filters; it does not count purchases or events repeatedly within one session.

### How the goal segment is merged with the active segments

UXWizz combines the active segment's filters with the goal's filters before counting sessions.

#### Example of internal goal segment merging:

1. Create a goal for sessions that visited `/pricing`.
2. Activate a segment for sessions referred by a specific website.
3. UXWizz counts sessions matching the combined referrer and page filters.

If the active segment has 42 sessions and 19 also match the goal, the conversion rate is `19 / 42 × 100 = 45.2%`.

### How filters are combined

| Filter         | Active segment | Goal          | Combined filter                   |
| -------------- | -------------- | ------------- | --------------------------------- |
| IP             | A              | B             | B; the goal value takes priority. |
| Tags           | A, B           | C             | A, B, and C.                      |
| Visited pages  | A, B           | C             | A, B, and C.                      |
| Country        | US, RO         | RO, DE        | RO, the common country.           |
| Referrer       | A.com, B.com   | B.com, C.com  | B.com, the common referrer.       |
| Session length | 5–30 seconds   | 17–49 seconds | 17–30 seconds.                    |

An empty intersection gives no matches. For example, a goal restricted to US sessions cannot match an active segment restricted to RO sessions.

If a goal is empty, check the selected domain, date range, and active filters. Confirm that the required page visit or [tag](/api/tags.md) appears in **Visitors** before changing the goal.
