Goals on Turbo pages created in Yandex.Webmaster

Goals for an informational site

To track the users' interaction with Turbo page elements, use a “JavaScript event” goal.

Linking an existing goal
  1. Add the turbo:goal element to an RSS feed:
    ...
    <turbo:goal type="yandex" turbo-goal-id="goal-link" name="TARGET" id="12345" />
    <turbo:content>
       <![CDATA[
           ...
       ]]>
    </turbo:content>
    where
    • name is the goal ID.
    • id is the tag number.
    • turbo-goal-id is the ID to assign to the Turbo page content
  2. Add the ID to the content you want to track statistics for as the data-goals attribute value. You can specify multiple comma-separated values, i.e., you can link multiple goals to a single element on a Turbo page.
    <turbo:content>
        <![CDATA[
            <p><a href="http://example.com/" data-goals="goal-link,goal-link2">Text</a></p>
        ]]>
    </turbo:content>
Creating a new goal
  1. Add the turbo:goal element to an RSS feed:
    ...
    <turbo:goal type="yandex" turbo-goal-id="goal-link" name="TARGET" id="12345" />
    <turbo:content>
       <![CDATA[
           ...
       ]]>
    </turbo:content>
    where
    • name is the goal ID.
    • id is the tag number.
    • turbo-goal-id is the ID to assign to the Turbo page content
  2. Add the ID to the content you want to track statistics for as the data-goals attribute value. You can specify multiple comma-separated values, i.e., you can link multiple goals to a single element on a Turbo page.
    <turbo:content>
        <![CDATA[
            <p><a href="http://example.com/" data-goals="goal-link,goal-link2">Text</a></p>
        ]]>
    </turbo:content>
  3. In Yandex.Metrica, go to Settings, open the Goals tab, and click Add goal.
  4. In the Name field, enter a name for the goal to create.
  5. Set the condition to JavaScript event.
  6. Specify the goal ID.
  7. Click Add goal and save changes.

Data will start being transmitted to Yandex.Metrica after the robot checks the RSS feed and finds out about the changes.

The created goal can be used in most Yandex.Metrica reports. You can also track conversions by goal using the Conversions report.

Goals for your online store

Note. If E-commerce is configured on your site, you don't have to configure goals to collect E-commerce statistics for your Turbo pages. The purchase (the order and items in the basket) is tracked automatically. You can also configure tracking for the checkout funnel.

If your online store uses Turbo pages that are generated from a YML file, you can track the following metrics:

User actions

Sales funnel

User actions

To track user actions in Yandex.Metrica, you need to use the “JavaScript event” goal type and IDs. This enables you to track:

Action ID
Cart actions
Clicks on the Add to cart button add-to-cart
Go to cart button clicks (appears instead of the Add to cart button) open-cart-from-product
Clicks on the Go to cart button displayed in the page header open-cart-from-header
Opening the order form in the cart open-check-out-form-from-cart
Sending information via the order form from the cart send-check-out-form-from-cart
Each instance the “Thank you for your order” message is displayed in the cart check-out-form-success-from-cart
1-click purchases
Each instance a user opens the Buy in 1 click form open-check-out-form
Each instance information is sent via the Buy in 1 click form send-check-out-form
Each instance the “Thank you for your order” message is displayed check-out-form-success-from-cart
Actions involving the item list
Sending search queries products-search-submit
Selecting item categories open-category
Sorting items sort-products
Viewing product info open-product-item
Enabling filters (meaning each time the Show button is clicked after filters are selected) apply-filters
  1. Set up the actions you want to track via Yandex.Webmaster.
  2. In Yandex.Metrica, go to Settings, open the Goals tab, and click Add goal.
  3. In the Name field, enter a name for the goal to create.
  4. Set the condition to JavaScript event.
  5. Specify the action ID as shown in the table above.

  6. Click Add goal.

Sales funnel

To track the sales funnel, use a “multi-step goal”. Read the multi-step goal requirements.

To enable Yandex.Metrica to track the goal completion, set the same tag for the Turbo pages and your site's pages.

Viewing Turbo pages

Create a multi-step goal with the steps of making an order on your site. If the user who placed the order viewed the Turbo page during the session, Yandex.Metrica will include this session in Turbo pages statistics.

You can view statistics for Turbo pages as follows:

  1. Find the Sessions that condition group and click .
  2. Choose the condition Behavior → Turbo page → Turbo.
  3. Click Apply.
Clicking “Add to cart”
  1. In Yandex.Webmaster, set up the Add to cart button.
  2. In Yandex.Metrica, go to Settings and open the Goals tab.
  3. Click Add goal.
  4. In the Name field, enter a name for the goal to create.
  5. Set the option to Multi-step goal.
  6. Add the steps. To set up the steps, use:

    The goal ID to track clicks on the “Add to cart” button (required condition)
    1. For the condition, choose the “goal ID event”.
    2. Enter the add-to-cart value in the field.
    Custom Java Script event

    When you create a goal, you set its ID. When a goal is completed, the reachGoal method is called, and the specified ID is passed to it.

    1. Use the reachGoal method on site pages.

    2. For the condition, choose the “goal ID event”.
    3. Specify the ID of the goal.
    Conditions for tracking pageviews
    Condition Description
    “url: matches” Specify the full URL of the target page.
    “url: contains”
    Specify part of a URL. Use this option if there are multiple target pages and they can be combined with a single condition. Specify as much of the URL as possible so the goal is completed only on the desired pages.
    Example
    If the condition is /abc, the goal will be completed on the pages example.com/abc-1, example.com/abc/2, and example.com/abcd.
    “url: begins with...”
    Only the first part of the URL is specified. Use this condition if you want to track views in subdirectories.
    Example
    If the condition is https://example.com/abc/, the goal is completed on https://example.com/abc/1, https://example.com/abc/2, and https://example.com/abc/1/2/3.
    “url: regular expression” Used for tracking URLs that match a custom pattern.

    If you want the goal to be completed for pageviews with URLs containing the + sign, put %2B in the template in place of the + character.

    See the examples for using “url:” criteria.

  7. Click Add goal. The created goal is shown in the list of goals.
  8. Click Save. Yandex.Metrica begins collecting statistics within a few minutes after saving settings.
Opening a form and submitting information

Below is an example of how to track a 1-click purchase. You can also track other actions.

  1. In Yandex.Webmaster, set up the Buy in 1 click form.
  2. In Yandex.Metrica, go to Settings and open the Goals tab.
  3. Click Add goal.
  4. In the Name field, enter a name for the goal to create.
  5. Set the option to Multi-step goal.
  6. Add the steps. For the condition, choose the “goal ID event”. For example:
    • Step 1 – Opening the form. For the ID, specify open-check-out-form.
    • Step 2 – Sending information. For the ID, specify send-check-out-form.
  7. Click Add goal. The created goal is shown in the list of goals.
  8. Click Save. Yandex.Metrica begins collecting statistics within a few minutes after saving settings.

If you were unable to independently check the tag, follow the recommendations below.

This might happen for the following reasons:

  • The tag is installed incorrectly. For example, the CMS modified the code snippet. Reinstall the tag or contact the support service for your CMS.
  • Broken scripts are preventing the Yandex.Metrica tag from working on the site. You can check this in the browser console.

This means that information is being transmitted to Yandex.Metrica. However, the data might not be shown in reports for any of the following reasons:

  • Data is sent to a tag with a different number.
  • The Filters tab in the tag settings has overly strict filters defined. Remove unneeded filters.
  • The Filters tab in the tag settings has the Don't count my sessions filter enabled. This means that the tag doesn't register your own sessions. Try accessing the site with your browser in “incognito” mode.