Statistics in Yandex.Metrica (by widget)

You can use Yandex.Metrica to identify the level of user interest in widgets.

  1. Step 1. Create goals in Yandex.Metrica
  2. Step 2. Specify the Yandex.Metrica tag in the widget code
  3. Step 3. Create widgets in Yandex.Metrica

Step 1. Create goals in Yandex.Metrica

For a tag in Yandex.Metrica, add four goals with the type . If you have no tag installed on your site, create one and add a code snippet to the site pages.

Goal name Description Goal ID in Yandex.Metrica

Widget initialization

The goal is completed when a product search query is sent to Yandex.Market and the widget starts loading.


Widget loading

The goal is completed when products are found on Yandex.Market and the widget loads on the page (in any part of the page, even outside the visible area).


Widget display

The goal is completed when at least 50% of the widget area has been displayed in the active browser window for at least two seconds.


Click on a widget

The goal is completed when the user clicks the widget and goes to a store's website, Yandex.Market, or Beru.


For more information, see the Yandex.Metrica Help:

Step 2. Specify the Yandex.Metrica tag in the widget code

  • In the constructor: fill in the Yandex.Metrica tag field.
  • In the code: specify the metrikaCounterId parameter (for example, metrikaCounterId: 12345).

You can find the Yandex.Metrica tag number in the Settings menu.

Sample widget code
<script async src="" type="text/javascript">
<script type="text/javascript">
  (function (w) {
    function start() {
      w.removeEventListener("YaMarketAffiliateLoad", start);
        containerId: "marketWidget1",
        type: "offers",
        params: {
          clid: 2310490,
          searchText: "Яндекс.Телефон",
          themeId: 2,
          metrikaCounterId: 12345
      ? start()
      : w.addEventListener("YaMarketAffiliateLoad", start);
<div id="marketWidget1"></div>

Step 3. Create widgets in Yandex.Metrica

On the Dashboard page in Yandex.Metrica, add widgets to estimate statistics and conversions. All widgets have the “Metric” type.

Attention. Be sure to fill in both the Main and Segmentation tabs.
How to fill in the fields
Main → Name Main → Statistics Main → Goal Main → Metric Segmentation → Sessions in which

Widget initializations


Widget initialization

  • Conversion rate: For widgets with conversions.
  • Goals reached: For widgets with statistics.


Widget loads

Widget loading

Conversions “Widget Initialization”

Widget displays

Widget display

Conversions “Widget loading”

Clicks on widgets

Click on a widget

Conversions “Widget display”