Multi-step goal
Use this type of goal to set a sequence of steps that a user must complete within a session. The conditions specified in each step are executed in the strict order defined in the goal settings. If any condition isn't met, all subsequent steps won't be completed.
How to create a multi-step goal
-
In Yandex Metrica, go to the Goals page in the left menu.
-
Click Add goal.
-
Select the Multi-step goal type.
-
In the Name field, enter a name for the goal to create.
-
Specify a Step name.
-
Add the steps. You can use the available goal types as conditions:
- Conversion.
- Page view.
- Site search.
- Form submission.
- Click on button.
- Click on phone number.
- Click on email.
- Calls.
- Chats.
- Click through to messenger.
- Click through to social network.
- Return from payment system.
- File download.
- Parameters.
You can select no more than 10 conditions.
-
Click Add goal. The created goal will appear in the list of goals. Yandex Metrica will start collecting statistics on it within a few minutes.
-
Check whether the goal is working correctly.
Using offline events
Offline events can be used as part of a multi-step goal.
Keep in mind that offline goals can be transmitted and reached later than the session occurred. For this reason, if you use offline events in earlier steps and online events in later steps, the latter will only be achieved after the earlier offline event is achieved.

When handling the condition, such symbols as ?, #, &, and the dot (.) are removed from the end of the URL. For example, the URLs http://example.com/?, http://example.com/#, and http://example.com/?var=1& will be compared to http://example.com/, http://example.com/, and http://example.com/?var=1, respectively. To add these symbols, except the dot, to the URL, use the url: regular expression condition.
If you want the goal to be completed for pageviews with URLs containing the plus sign, put %2B in the template in place of the + character.
- Example

See the examples for using “url:” criteria.
“Event: goal ID” as a condition in a multi-step goal
An event in a multi-step goal is an event transmitted to Yandex Metrica via JavaScript. Creating a goal includes specifying its identifier. When a goal is completed, the reachGoal method is called, and the specified ID is passed to it.
-
In Yandex Metrica, go to the Goals page in the left menu.
-
Select the Multi-step goal type.
-
Choose the “goal ID event” condition.
-
Specify the ID of the goal. Below the identifier field, the Goal code for site line will appear. Copy the code. You will need it to configure the reachGoal method on your site.
-
Use the
reachGoalmethod on site pages.Examples
Clicking a buttonFilling in a form... <form action=""> ... <input type="button" onclick="ym(XXXXXXXX, 'reachGoal', 'TARGET_NAME'); return true;" value="Order now" /> </form> ...... <form action="" method="get" onsubmit="ym(XXXXXXXX, 'reachGoal', 'TARGET_NAME'); return true;"> ... </form> ...
If you use a regular expression as an identifier, this regular expression must contain only the identifier value (without any domain or website protocol).
Example
If you want to track clicking a particular button with the ID that contains button or buy, you can specify the following condition: button|buy.
Requirements and restrictions
-
A goal may contain a maximum of five steps. Up to 10 conditions can be added to a single step.
-
Select a chain of steps so that each subsequent step can’t be taken unless the previous one is performed. For example, if a user can skip the first step and immediately perform the second step, the goal is not considered completed.
-
The user must follow the sequence of actions defined in your goal settings. However, they can still complete actions that are not linked to any goals, such as viewing other site pages. This won’t break the sequence required to achieve your goal.
-
The steps must be completed during a single session.
-
The conditions described in these steps are combined using the logical OR operator. A goal is considered completed if at least one of its conditions is met.
-
A maximum of 200 goals can be set for each tag.
-
The service registers a user reaching the same goal on the same counter no more than once per second.
-
During a single user session, the service can register up to 1000 offline conversions and 400 online conversions created for the tag.
-
If you edit the tag or a goal, all the previously collected information does not change.
-
If you delete a goal, information collected for it is no longer available in reports.
Example of user registration on a site
The tag owner’s site has a “Register” link (
http://example.com/registration/). When a user clicks the link, it opens a form to fill in with the “Submit” button.For the first step:
- Set the type of condition to “url: contains”.
- Specify the condition
registration.For the second step, use a JavaScript event:
Learn more
|
Useful links |
Online training |