Solving issues with goals

This section will help you learn more about potential issues configuring goal and how to solve them.

Step 1. Check your tag

Make sure that:

  • The tag isn't installed on the target page. If some of the site's content is displayed in a frame, set the tag code inside the frame, too.
  • Other scripts on the site don't block the tag.
  • The tag isn't blocked by the Adblock Plus extension.
  • No filters exclude the target page from statistics.

Check that your tag works on the site.

The goal may also not be considered completed if the user left the page before the tag loaded.

Step 2. Check the settings on the site

Select a goal type:

The goal isn't not be considered completed in the following cases:

  • The code for calling the reachGoal method is missing.
  • The reachGoal method was added correctly, but the event that triggers this method doesn't occur. (for example, if the onsubmit event for submitting form data didn't take place).
  • The tag ID specified in the reachGoal method is different from the tag with the “JavaScript event” goal.
Check that reachGoal is also called correctly. If you use:
  • The new format ym(XXXXXX, 'reachGoal', 'goal'), install the new tag code on the site (recommended).
  • The old format yaCounterXXXXXX.reachGoal('goal'), you can use any version of the tag code.

    If you have the old version of the tag code and reachGoal is called before tag code initializes, the following error is displayed in the browser console: “yaCounterХХХХХХ is not defined”. We recommend adding the triggerEvent parameter to the code snippet and also making it possible to complete the goal after checking for tag initialization.

Step 3. Check your goal settings

Make sure that the goal ID in the reachGoal method matches the goal ID in the tag settings.


The goal isn't not be considered completed in the following cases:

  • The page has a redirect loop.
  • Site page URLs contain an anchor (such as https://example.com/page/#fragment) and the page doesn't refresh when opening that address. We recommend enabling the Hash tracking in the browser address bar option in the tag settings, and then updating the code snippet on all the site's pages.
Step 3. Check your goal settings

Make sure that:

  • The target page URL is correct.
  • No errors were found in the goal condition. Select the condition you want to create a goal for:

    Make sure the page address given in the goal condition matches the target page URL (the prefix "www" doesn't affect the address). For example, if you want to track sessions for https://www.example.ru/page/, you can set up your goal as follows:
    • https://example.com/page/.
    • https://www.example.com/page/.

    Make sure the target URL contains the part of the address given in the goal condition.

    For example, if the address is https://example.com/catalog, the goal condition “url: contains catalog will work, but “url: contains catalog/ won't, since there is no / at the end of the destination page URL. If you goal is a click a phone number, you should enter %2B instead of + in the goal condition (tel:%2B7495 111-11-11).


    Make sure the target URLs begin with the part of the address given in your goal settings and include the protocol (HTTP / HTTPS). For example, if you want to track https://www.example.com/catalog/divan and https://example.com/catalog/krovat, your goal should look like this: "url: starts with https://example.com/catalog" or "url: starts with https://example.com/catalog/").


    Make sure the destination URLs match the regular expression set in the goal settings. Regular expression conditions

    Check regular expression

    To check the expression, open the Popular report and create a segment for regular expression views. For example, if you want to count the number of sessions for pages that have numbers in their URLs, your goal condition might look like this: “URL: regular expression \d”. Sample report with a segment


Make sure that each step can't be completed without completing the previous one.

Step 3. Check your goal settings

Check that your steps are configured correctly. Choose a condition:

Make sure the page address given in the goal condition matches the target page URL (the prefix "www" doesn't affect the address). For example, if you want to track sessions for https://www.example.ru/page/, you can set up your goal as follows:

  • https://example.com/page/.
  • https://www.example.com/page/.

Make sure the target URL contains the part of the address given in the goal condition.

For example, if the address is https://example.com/catalog, the goal condition “url: contains catalog will work, but “url: contains catalog/ won't, since there is no / at the end of the destination page URL. If you goal is a click a phone number, you should enter %2B instead of + in the goal condition (tel:%2B7495 111-11-11).


Make sure the target URLs begin with the part of the address given in your goal settings and include the protocol (HTTP / HTTPS).

For example, if you want to track https://www.example.com/catalog/divan and https://example.com/catalog/krovat, your goal should look like this: "url: starts with https://example.com/catalog" or "url: starts with https://example.com/catalog/").


Make sure the destination URLs match the regular expression set in the goal settings. Regular expression conditions

Check regular expression

To check the expression, open the Popular report and create a segment for regular expression views. For example, if you want to count the number of sessions for pages that have numbers in their URLs, your goal condition might look like this: “URL: regular expression \d”. Sample report with a segment


The goal ID in the reachGoal method must match the goal ID in the tag settings.


Check the goal settings to see if the email address is correct. It must be the same as in the link on the site, but without mailto:. For example, mail@example.com.


Check the goal settings to see if the phone number is correct. It must be the same as in the link on the site, but without tel:. For example, +70123456789.


The goal is not considered completed in the following cases:

The goal is configured for a specific form.
In this case, make sure that:
  • The form parameters have not changed (ID (id), name (name), or the path to the DOM element).
  • The form is not installed in an iframe. If the form is installed in an iframe, make sure that the same tag code is installed in the iframe as on the site.
The goal is configured for all forms.

In this case, make sure that the form is not installed in an iframe. If the form is installed in an iframe, make sure that the same tag code is installed in the iframe as on the site.

Step 3. Check your goal settings
  1. Append the _ym_debug=1 parameter to the page URL in the browser's address bar and reload the page.
    http://example.com/?_ym_debug=1
  2. Open the console. The following message should be displayed:
    Form goal. Counter XXXXXX. Init
    It indicates that the form is working.
  3. Submit the form. After that, you will see a message in the console:
    Form goal. Counter XXXXXX. Form: ? [your form IDs]

Check the goal settings to see if the URL in the messenger link is correct:

Messenger URL
Yandex Messenger https://yandex.ru/chat/
Facebook m.me, messenger.com, www.messenger.com
Skype skype
Telegram t.me, tg://, telegram.me, tlgg.ru, tele.click
Viber viber://, partners.viber.com/
WhatsApp wa.me, api.whatsapp.com, web.whatsapp.com, whatsapp://
VK vk.me, vk.com/im, vk://