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.
Ensure your app tracks Goal completed events. Otherwise, the expression will always evaluate to false.
Syntax
The basic syntax for this expression is:
user has completed goal /*<goal>*/
The negation of the expression can be expressed as:
user has not completed goal /*<goal>*/
You can refine the expression with quantifiers, and time windows:
user has completed goal /*<goal>*/ /*<quantifier>*/ /*<window>*/
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"
Or check if they have not completed a specific goal:
user has not completed goal "form-submitted"
You can also check how many times a goal was completed:
user has completed goal "cta-clicked" exactly 3 times
Or filter by time, such as checking if the goal was completed yesterday:
user has completed goal "demo-requested" yesterday
Combine counts, and time windows in one expression:
user has completed goal "purchase" exactly 2 times today