Goal completed

Record when a user completes a goal.

This event tracks the completion of a goal, also known as a conversion.

Croct's mascot neutral
When should I track this event?

Track this event whenever a user reaches a goal that you want to measure, like submitting a form or placing an order.

Implementation

Here is an example of how to track this event:

example.js
1234567
import croct from '@croct/plug';
croct.track('goalCompleted', {
goalId: 'signup',
currency: 'USD',
value: 50
});

Input properties

These are the supported properties:

goalId
string

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

The value must be between 3 and 100 characters long, containing only letters, digits, and separators ("-", "_" or ":"), starting and ending with letters or digits.

currency(optional)
string

The currency in which the monetary value is expressed, such as "USD" or "EUR".

We recommend using the 3-letter currency codes defined by the ISO 4217  standard. For currencies having no official recognition in the standard, consider using ISO-like codes adopted locally or commercially, such as "XBT" for BitCoin.

value(optional)
number

The monetary value associated with completing the goal.

This can represent an estimated value or a symbolic value. For example, if the sales team converts 10% of newsletter sign-ups into customers, with each customer averaging a $500 transaction, the value of each newsletter sign-up would be $50 (10% of $500).

The value must be non-negative.

Processed properties

This event has no processed properties.

Payload examples

Below is an input example for this event:

123
{
"goalId": "signup"
}