Conversion

Use the Conversion goal to track both online and offline events.

This type of goal lets you track various events on your site — from simple actions (button clicks, form submissions) to complex programmed scenarios with multiple conditions. It also supports transmitting data about offline conversions that occurred outside your site (for example, order payments). With this goal type, you can track virtually any user actions.

To pass data about online events, use the reachGoal method. For offline events, follow the instructions for transmitting offline data.

Tip

If you're not comfortable with coding, use:

How to create a target event

Note

Goal identifiers for matches and contains conditions mustn't contain the following characters: /, \, &, #, ?, =, and ". If you need to add to an ID the + sign, replace it with %2B.

  1. In Yandex Metrica, use the left menu to go to the Goals page and click Add goal.

  2. Select the Conversion goal type.

  3. In the Name field, enter a goal name.

  4. Specify a condition and goal identifier.

  5. Configure data transmission to Yandex Metrica based on the data transfer method (online or offline).

    To transmit a target event from your site to Yandex Metrica, add code with the reachGoal method to the page.

    Examples:

    Clicking a button
    <form action="">
    ...
    <input type="button" onclick="ym(XXXXXXXX, 'reachGoal', 'TARGET_NAME'); return true;" value="Order" />
    </form>
    
    • XXXXXXXX — The ID of your tag.
    • TARGET_NAME — Goal ID.
    Filling in a form
    ...
    <form action="" method="get" onsubmit="ym(XXXXXXXX, 'reachGoal', 'TARGET_NAME'); return true;">
    ...
    </form>
    ...
    
    • XXXXXXXX — The ID of your tag.
    • TARGET_NAME — Goal ID.
    Sending revenue by goal
    ...
    <form action="">
    ...
    <input type="button" onclick="ym(XXXXXXXX, 'reachGoal', 'TARGET_NAME', {order_price: '1000.35', currency: 'RUB'}); return true;" value="Order"/>
    </form>
    ...
    
    • XXXXXXXX — The ID of your tag.
    • TARGET_NAME — Goal ID.
    • order_price — Revenue by goal. You can specify revenue in a currency or in conventional units.
    • currency — Currency of the revenue by goal. Yandex Metrica understands three-letter ISO 4217 currency codes.

    To send an offline target event, use:

    To learn more, see Transmitting and processing data.

  6. Click Add goal. The new goal will appear in the list. Yandex Metrica will start collecting statistics within a few minutes.

  7. Check whether the goal works correctly.

Conditions for tracking a goal

There are several types of conditions available when creating a goal. Conditions are combined with the OR operator, so the goal is considered completed if at least one of the set conditions is met.

Criterion

Description

matches

A full goal identifier is specified.

contains

A part of the ID is specified. Use this option if there are multiple goals and they can be combined with a single condition. Specify as much of the ID as possible so that only the desired goals are achieved.

Example

If the condition is button, the goal will be completed for the goal-button, button-goal, and goal-buy-button IDs.

regular expression

This is used for tracking goal identifiers that match a custom template.

When setting up the condition, the regular expression must only contain 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.

Restrictions

  • 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.

Learn more

Chat with us

Write an email

Goals in Yandex Metrica work the same way for any sources. Perhaps there aren’t any users who have completed the goal from this source yet.

The recommendations did not help

Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.

This might happen for the following reasons:

  • The goal condition in Yandex Metrica doesn't cover all the possibilities. For example, the goal is set as going to the order confirmation page, but the site also allows instant checkout without visiting this page.
  • The site user has a browser plugin that blocks the Yandex Metrica tag, so this user isn’t counted.
  • The user has an antivirus system with strict privacy settings.
  • The user has a slow internet connection, so the Yandex Metrica tag didn’t load on the target page.
The recommendations did not help

Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.