# Purchase and revenue goals

> Count a store purchase as the conversion of a push, in-app message or journey, and compare revenue per person against the control group.

Source: https://docs.grovs.io/docs/revenue/goals

A purchase goal matches any purchase or only products you choose. Every experiment report also shows each group's revenue, whatever the goal. For variants, control groups and confidence, see [Experiments](https://docs.grovs.io/docs/engagement/experiments).

> **Note:** Goals and revenue only see purchases Grovs records. Turn on [revenue tracking](https://docs.grovs.io/docs/revenue) and log purchases from your app first.

## Set a purchase goal

### 1. Open the goal

In a push campaign or in-app message, open the **Experiment** step of the composer. In a journey, open its goals. For other goal kinds, see [Experiment goals](https://docs.grovs.io/docs/engagement/experiments/goals).

### 2. Choose a purchase

Under **Count as a conversion**, choose **A purchase**.

### 3. Choose the products

Under **Which products**, keep **Any product**, or choose **Only these products** and add up to 20 product IDs.

### 4. Choose the window (push and in-app only)

Under **Conversion window**, pick how long after seeing the message a purchase still counts: **within 1 day**, **within 3 days**, **within 7 days** or **within 30 days**. The 30-day window is offered only for purchase goals.

## What counts as a purchase

- Every `buy` counts, including subscription renewals.
- With **Only these products**, only the listed product IDs count.
- A person converts if they buy within the window after first seeing the message.
- An app event named `purchase` is not a store purchase. It never reaches a purchase goal, but it matches a custom event goal named `purchase`.

## Purchases in journeys

A purchase goal takes the person out of the journey as converted, like other journey goals.

- Only a purchase made after the person entered the journey counts.
- Journeys have no conversion window. A purchase counts any time while the person is in the journey.
- A purchase attributed to the person later still takes them out, if it was made after they entered.

## Revenue on the report

Every experiment report shows revenue, with or without a purchase goal.

| Number         | Meaning                                                                            |
| -------------- | ---------------------------------------------------------------------------------- |
| **Revenue**    | Revenue from the group's people within the window after they first saw the message |
| **Per person** | That revenue divided by the number of people in the group                          |

With a control group, the card also compares them, for example: "Variants brought about $1,240 more than the control (+18% per person)."

- Revenue is in US dollars and net of refunds. A reversed refund restores it.
- The window is the goal's conversion window. Without a goal it is 72 hours.
- The comparison pools all variants against the control, using exact per-person values. Only displayed numbers are rounded.
- The percentage is omitted when the control's revenue per person is zero.
- The comparison is omitted when there is no control group or either side has no exposed people.
- Revenue has no confidence figure. Confidence applies to conversions only.
- A journey with a control group and no goal still gets a report with revenue.
- When two visitors merge, purchases made before the merge stay with the old visitor. They can drop out of the revenue figures.

## The goal format

A purchase goal is stored as:

```json
{ "purchase": true, "products": ["premium_month", "premium_year"], "window_hours": 720 }
```

| Field          | Rules                                                                                                       |
| -------------- | ----------------------------------------------------------------------------------------------------------- |
| `purchase`     | Must be `true`                                                                                              |
| `products`     | Optional. 1 to 20 product IDs of 1 to 100 characters. Omit for any product. Allowed only on a purchase goal |
| `window_hours` | `24`, `72`, `168` or `720`. `720` is allowed only on a purchase goal                                        |

A goal has exactly one of `event`, `screen`, `system` or `purchase`.

Report groups carry `revenue_cents` and `revenue_per_person_cents`. The report carries `revenue_lift` and `added_revenue_cents`, which are `null` when there is nothing to compare.
