# Goal completed

Learn how to check if a user has completed a specific goal.

This expression checks whether the user has completed a specific goal based on the [Goal completed](/reference/event/types/engagement/goal-completed) events tracked by your application. Goals represent key actions such as starting a checkout, subscribing to a plan, or submitting a form.

> **Tracking required**
>
> Ensure your app tracks [Goal completed](/reference/event/types/engagement/goal-completed) events. Otherwise, the expression will always evaluate to false.

## Syntax

The basic syntax for this expression is:

```cql
user has completed goal /*<goal>*/
```

The negation of the expression can be expressed as:

```cql
user has not completed goal /*<goal>*/
```

You can refine the expression with quantifiers, and time windows:

```cql
user has completed goal /*<goal>*/ /*<quantifier>*/ /*<window>*/
```

## Parameters

These are the supported parameters:

- `goal`: `string`

  A unique identifier for the goal. For example, "signup", "purchase", "newsletter-subscription".

- `quantifier`: `Quantifier` (optional)

  A quantifier to specify how many times the event must have occurred.

- `window`: [`TimeWindow`](/reference/cql/expressions/events/time-window) (optional)

  The time window during which the goal completion must have occurred.

## Event properties

This event does not have additional properties.

## Examples

You can check whether a user has completed a specific goal:

```cql
user has completed goal "checkout-started"
```

Or check if they have not completed a specific goal:

```cql
user has not completed goal "form-submitted"
```

You can also check how many times a goal was completed:

```cql
user has completed goal "cta-clicked" exactly 3 times
```

Or filter by time, such as checking if the goal was completed yesterday:

```cql
user has completed goal "demo-requested" yesterday
```

Combine counts, and time windows in one expression:

```cql
user has completed goal "purchase" exactly 2 times today
```

> **Scale plan**
>
> This feature is available only to accounts on the Scale plan. See the [pricing page](https://croct.com/pricing) for more information.

## Explore

- [Audiences](/explanation/audience): Understand how to delivery content to specific groups of users.
- [Event tracking](/reference/event/types/engagement/goal-completed): Learn how to track this event.
