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 events tracked by your application. Goals represent key actions such as starting a checkout, subscribing to a plan, or submitting a form.

Syntax

The basic syntax for this expression is:

user has completed goal /*<goal>*/
Try in Playground

The negation of the expression can be expressed as:

user has not completed goal /*<goal>*/
Try in Playground

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

user has completed goal /*<goal>*/ /*<quantifier>*/ /*<window>*/
Try in Playground

Parameters

These are the supported parameters:

goal

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

quantifier(optional)
Quantifier

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

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:

user has completed goal "checkout-started"
Try in Playground

Or check if they have not completed a specific goal:

user has not completed goal "form-submitted"
Try in Playground

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

user has completed goal "cta-clicked" exactly 3 times
Try in Playground

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

user has completed goal "demo-requested" yesterday
Try in Playground

Combine counts, and time windows in one expression:

user has completed goal "purchase" exactly 2 times today
Try in Playground