Configuring Dynamic Retargeting in Yandex.Direct for 1С-Bitrix
Dynamic retargeting in Yandex.Direct shows user cards of specific products they viewed. Technically this works via Yandex Audiences + product feed in Yandex Market + segments in Metrica. Bitrix can generate required feeds and supports event transmission via built-in Yandex.Metrica integration.
Product feed for Yandex.Direct
Yandex accepts feed in YML format. In Bitrix configure export via "Shop → Export Products → Yandex.Market". Key parameters for retargeting:
- Field
idin<offer>element must match ID transmitted to Metrica - Field
picture— absolute image URL accessible without redirects - Field
url— canonical product detail page URL - Field
price— current price without discounts or with — depends on settings
Feed is published by URL and updated by agent. In Yandex.Business or Direct cabinet, add feed as product source for smart banners.
Event transmission to Yandex.Metrica
For dynamic retargeting, configure e-commerce in Metrica (ecommerce: true in counter code) and transmit events:
Product view — in catalog.element component template:
window.dataLayer = window.dataLayer || [];
dataLayer.push({
ecommerce: {
detail: {
products: [{
id: '<?= $arResult['ID'] ?>',
name: '<?= CUtil::JSEscape($arResult['NAME']) ?>',
price: <?= $arResult['CATALOG_PRICE_1']['PRICE'] ?? 0 ?>,
category: '<?= $sectionName ?>'
}]
}
}
});
Add to cart and purchase — similarly via add and purchase in dataLayer.
Bitrix has built-in integration: "Settings → Web Analytics → Yandex.Metrica". Enable e-commerce there — some events will be transmitted automatically via bitrix:sale.checkout component.
Retargeting segments in Yandex.Audiences
After Metrica setup, create segments:
- "Viewed product, didn't buy" — visited product detail page (
detailevent), did NOT reach "Purchase" goal - "Added to cart, didn't buy" —
addevent, without "Purchase" goal - "Buyers" — "Purchase" goal — for exclusion from retargeting
In Direct create "Smart Banners" campaign, connect product feed and segments from Audiences. Yandex automatically selects product cards matching user's viewing history.
Product ID match in feed and Metrica
Critical point: ID in tag <offer id="..."> of feed and ID in dataLayer (id: '...') must match. Use infoblock element ID ($arResult['ID']) in both places. Some stores use article or 1C code — then transmit same identifier everywhere.
What we configure
- YML-feed with Yandex.Direct settings and agent update every 4–6 hours
- Yandex.Metrica counter with e-commerce enabled in site template
- dataLayer events on product, cart, and successful order pages
- Retargeting segments in Yandex.Audiences based on Metrica goals
- "Smart Banners" campaign in Direct with feed and segment binding







