# Achieving a manually triggered goal

Currently, there are two types of goals - automatic and manually triggered goals.

You can read more about this in the main article.

For a manually triggered goal, you need to call the reachGoal method, for example:

/* Clicked on add to cart */
impact('reachGoal, '5d77fb20-4526-4b67-bd1c-2373e787fcd2');

The generated code with the goal ID for passing information about goal achievement is displayed in the goal editor itself.

# Passing additional parameters

In the reachGoal method, you can also pass additional parameters:

  • Net profit netProfit
  • Revenue revenue

In this case, the example would look like this:

/* Clicked on add to cart */
impact('reachGoal, '5d77fb20-4526-4b67-bd1c-2373e787fcd2', { 
    netProfit: 1.35,
    revenue: 10
});