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.