How to create widget code in the constructor

To open the constructor, click the button below:

You can also open the constructor in your Yandex.Distribution personal account, on the Yandex.Market tools tab.

Tip. You can close the constructor and then return to it: all the specified parameters are saved.

On the Appearance tab:

  1. Select the widget type and theme. Examples of different widgets:

  2. Specify the number of products or offers to show in a widget.

  3. Enable or disable widgets auto rotate. By default:

    • Yandex.Market widgets auto rotate with recommendation widgets is enabled.
    • Yandex.Market widgets auto rotate with Beru widgets is disabled.
    • Beru widgets auto rotate with Yandex.Market widgets is enabled.
  4. Set other parameters, if any.

On the Settings tab:

  1. Specify how to search for a product. Learn more about different search methods.

  2. Fill in the other fields.

    Field Description Supported services Value example
    Search

    Type of product search. For more information, see Searching products for widgets.

    Attention. No search by a request from an HTML element (the by request from HTML tag value) is supported if you embed a widget on a Turbo page.

    Yandex.Market, Beru

    By a text query

    Exact-match search

    Searching products by an exact-match query (with all the query words included).

    Used only when searching by a text query or a request from an HTML element.

    Yandex.Market

    On sale

    A filter by products on sale.

    Attention. Used only for the Yandex.Market Where to buy a product widgets.

    If this option is disabled, the widget may show offers of products that are no longer on sale. In this case, instead of the list of offers, the user will see a message saying “Out of stock” and the recommended selection of products Viewed together with.

    By default, the option is:

    The filter isn't supported for other search methods.

    Yandex.Market

    Discounts and promotions

    A product filter by type of promotion.

    Select one or more filters so that a widget only displays promotional products.

    Types of promotions:

    • Discounts (products offered at a special price).

    • Promo codes (product promo code discounts).
    • A gift for a purchase (buy a product and get another one for free).

    • More for the same price (buy N items and get M of the same item for free).

    Yandex.Market

    Discounts

    A product filter by discount.

    Select this option so that a widget only displays discounted products from Beru.

    Beru

    Categories

    A filter by product category. Specify category IDs separated by commas.

    Attention.

    Used for such widgets as Where to buy a product and Collection of products, some recommendation widgets, and widgets with product information.

    You can only specify one category ID for recommendation widgets and widgets with product information.

    How to find out the category ID

    Open the category page on Yandex.Market or Beru and check out its URL. An ID is a set of numbers after “...?hid=”. Example:

    https://market.yandex.ru/catalog/54726/list?hid=91491

    https://beru.ru/catalog/81621?hid=14727164

    Yandex.Market, Beru

    91072

    91072, 91498

    Manufacturers

    A filter by manufacturers whose products you want to show in a widget. Specify manufacturer IDs separated by commas.

    How to find out the manufacturer ID

    Open the manufacturer's page (for example, using a search) and check out the page URL. The manufacturer ID is a set of numbers after “...brands/”.

    For example: https://market.yandex.ru/brands/143.

    Yandex.Market, Beru

    153043

    153043, 153061

    Stores

    A filter by the domains of stores whose offers a widget should display. The domains are comma-separated.

    Note. The widget will only contain offers from the store whose domain you specified. For example, a widget whose domain is shop123.ru won't show offers from another-shop123.ru.

    Yandex.Market

    shop123.ru, shop456.ru

    Recommended stores

    A filter by products or offers from stores that a manufacturer recommends.

    Select this option to only display products or offers from the stores that the manufacturer recommends.

    By default, all products or offers are displayed.

    Yandex.Market

    Price (from), ₽

    A product filter by price (“price from”). Specify the price in RUB. Only integers are allowed.

    Yandex.Market, Beru

    1000

    Price (up to), ₽

    A product filter by price (“price up to”). Specify the price in RUB. Only integers are allowed.

    Yandex.Market, Beru

    3000

    Yandex.Metrica tag

    Tag number in Yandex.Metrica. You can use it to track widget statistics. You can find the Yandex.Metrica tag number in the Settings menu.

    Learn more about statistics.

    Yandex.Market, Beru

    12345

    CLID

    Your Yandex.Market partner ID.

    You can find it out from your account manager or in the Yandex.Distribution interface, on the Products page.

    Yandex.Market, Beru

    2310490

    VID

    A widget's additional ID. You can use it to track statistics just for this widget or compare statistics for the same widgets on different pages.

    Possible values: from 0 to 999.

    Yandex.Market, Beru

    1

    ContainerID

    ID of the element the widget will be located in.

    Yandex.Market, Beru

    "marketWidget"

  3. Click Get code. Copy the code and place it on your site. We recommend you to embed:

    • The widget script: In the head element as close as possible to its beginning.
    • The widget container: In the body element in the place where you want to show the widget.
Tip. You can customize the widget width using CSS styles. Example:
<div id="..." style="width: 970px;" ...></div>