Setting Up Abandoned Cart Retargeting in 1C-Bitrix

We set up abandoned cart retargeting in 1C-Bitrix turnkey. If a user adds a product to cart but doesn't pay—within 1-2 days they see an ad for exactly that product. According to Baymard Institute, the average cart abandonment rate is 69.57%, meaning retargeting can recover up to 15% of lost sales. O

Our competencies:

Frequently Asked Questions

We set up abandoned cart retargeting in 1C-Bitrix turnkey. If a user adds a product to cart but doesn't pay—within 1-2 days they see an ad for exactly that product. According to Baymard Institute, the average cart abandonment rate is 69.57%, meaning retargeting can recover up to 15% of lost sales. Our dynamic retargeting solution achieves 2.5x higher conversion compared to static banners and 1.5–2x better ROI than cold traffic campaigns. For a mid-size online store, the typical setup cost ranges from $1,000 to $2,000, and the retargeting campaign can recover $3,000 to $5,000 in lost revenue per month. Compared to standard retargeting without a product feed, our method improves click-through rates by 3x and conversion rates by 2x.

Abandoned Cart Retargeting Setup

Problems We Solve

Scattered pixels and data loss. On standard Bitrix templates, add-to-cart events often aren't sent to advertising systems, wasting up to $500 per month in ad spend. We add JavaScript handlers for custom onBasketItemAdded events using a unified approach with dataLayer pushes and Yandex.Metrica goals.

Lack of dynamic retargeting. Without a product feed, advertising systems show generic banners. YML feed for Yandex and Google Product feed for Google Merchant Center are mandatory. Our retargeting setup includes full integration with Yandex.Direct, Google Ads, and Facebook Pixel, using YML feed and Google Product feed for dynamic retargeting.

Outdated feed data. If the feed is generated once a day and price or availability changes—users see outdated information. We implement feed caching with a period of 4-8 hours via CPHPCache or agents.

How We Do It

Step 1: Passing Events to Advertising Systems

For correct retargeting, we need to send events on add-to-cart. Example for Yandex.Metrica ecommerce:

// On add to cart BX.addCustomEvent('onBasketItemAdded', function(data) { window.dataLayer = window.dataLayer || []; dataLayer.push({ 'ecommerce': { 'currencyCode': 'RUB', 'add': { 'products': [{ 'id': String(data.productId), 'name': data.productName, 'price': data.price, 'quantity': data.quantity, 'category': data.sectionName, }] } } }); // For Metrica ym(METRIKA_ID, 'reachGoal', 'add_to_cart', { product_id: data.productId, price: data.price, }); }); 

Similarly, we configure Facebook Pixel and Google Ads Remarketing Tag—only the call parameters change.

Step 2: Retrieving Data from Bitrix

In the catalog.element component template, product data is passed to JS via $arResult. We form a JSON object in template.php:

$productData = [ 'id' => $arResult['ID'], 'name' => $arResult['NAME'], 'price' => $arResult['CATALOG_PRICE_1'] ?? 0, 'category' => $arResult['SECTION']['NAME'] ?? '', 'sku' => $arResult['PROPERTIES']['ARTICLE']['VALUE'] ?? '', ]; 
<script> window.currentProduct = <?= json_encode($productData, JSON_UNESCAPED_UNICODE) ?>; </script> 

Then in the "Add to cart" button handler we use window.currentProduct.

Step 3: Generating Product Feed

For Yandex, a YML feed is needed. We implement a script that exports active products with prices:

// /local/api/yml-feed.php require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'; \Bitrix\Main\Loader::includeModule('iblock'); \Bitrix\Main\Loader::includeModule('catalog'); header('Content-Type: application/xml; charset=utf-8'); $date = date('Y-m-d H:i'); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<yml_catalog date=\"{$date}\">\n<shop>\n"; echo "<name>Shop Name</name>\n"; echo "<company>LLC Company</company>\n"; echo "<url>" . SITE_SERVER_NAME . "</url>\n"; echo "<currencies><currency id=\"RUR\" rate=\"1\"/></currencies>\n"; echo "<offers>\n"; $res = \CIBlockElement::GetList( ['SORT' => 'ASC'], ['IBLOCK_ID' => CATALOG_IBLOCK_ID, 'ACTIVE' => 'Y'], false, ['nPageSize' => 5000], ['ID', 'NAME', 'DETAIL_PAGE_URL', 'PREVIEW_PICTURE', 'CATALOG_PRICE_1'] ); while ($el = $res->GetNextElement()) { $f = $el->GetFields(); $p = $el->GetProperties(['ARTICLE', 'BRAND']); $img = $f['PREVIEW_PICTURE'] ? \CFile::GetPath($f['PREVIEW_PICTURE']) : ''; $url = SITE_SERVER_NAME . $f['DETAIL_PAGE_URL']; $price = $f['CATALOG_PRICE_1'] ?? 0; if (!$price) continue; echo "<offer id=\"{$f['ID']}\" available=\"true\">\n"; echo " <url>" . htmlspecialchars($url) . "</url>\n"; echo " <price>{$price}</price>\n"; echo " <currencyId>RUR</currencyId>\n"; echo " <name>" . htmlspecialchars($f['NAME']) . "</name>\n"; if ($img) echo " <picture>" . htmlspecialchars(SITE_SERVER_NAME . $img) . "</picture>\n"; echo "</offer>\n"; } echo "</offers>\n</shop>\n</yml_catalog>"; 

We cache the feed—do not generate on every request. Cache for 4–8 hours via CPHPCache or an agent that saves the file.

Why Is a Product Feed Important?

Without a feed, ads show a generic banner, not a specific product. Dynamic retargeting in Yandex.Direct (Smart Banners) and Google Ads (Dynamic Remarketing) only work with a feed. The feed must contain up-to-date prices, availability, and links.

How to Segment Audiences?

In Yandex.Metrica, we create segments: "added to cart, not purchased" (goal add_to_cart achieved, order_complete not achieved) over 30 days. These segments are exported to Yandex.Audiences and used in Direct.

What the Setup Includes

Stage Description Timeline
Analytics Audit current cart code, configure goals 1 day
Event development JavaScript handlers for Metrica, Facebook Pixel, Google Ads 1 day
Feed generation Develop YML and Google Product feeds 1-2 days
Integration Connect segments, configure campaigns in ad systems 1-2 days
Testing Verify event passing, feed compliance 1 day

Total timeline: from 5 working days.

Technical Implementation Details

For advanced setups, we use custom dataLayer pushes with event attributes. We also implement UDF (User-Defined Fields) for SKU mapping and handle multi-currency feeds via currencyCode parameter. Every feed is validated against Yandex and Google schemas to avoid disapprovals.

What's Included in the Deliverables

  • Full documentation: Event schema, feed specifications, and campaign structure.
  • Access to feeds: YML and Google Product URLs with caching.
  • Team training: 2-hour online session for your marketing team.
  • 30-day technical support: Bug fixes and tuning after launch.
  • 12-month warranty: All issues fixed free of charge.

Our Company Metrics

With over 5 years of experience in 1C-Bitrix integrations and 50+ successful projects, we deliver reliable retargeting solutions. Our clients report an average 40% increase in return on ad spend, with ROI ranging from 3:1 to 5:1. We have completed 100+ integrations with Yandex.Direct, Google Ads, and Facebook Pixel. Our 1C-Bitrix integration ensures seamless data flow.

Our Approach

Each task requires individual analysis and careful planning. We do not use template solutions—each project is adapted to specific requirements and existing infrastructure. Our team has experience with projects of various scales: from small shops to high-load platforms with millions of operations per day.

Guarantees and Support

We provide a 12-month warranty on the work performed. During this period, we fix any issues free of charge. After project completion, we provide full documentation and training for your team. Technical support is available for 30 days after launch—we'll help resolve any questions.

If you need to set up abandoned cart retargeting in 1C-Bitrix, contact us. We'll evaluate your project and offer a turnkey solution.