Setting up dynamic remarketing in Google Ads for 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    565
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    657
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    980

Configuring Dynamic Remarketing in Google Ads for 1С-Bitrix

Dynamic remarketing shows the user exactly the products they viewed on the site. For this you need three components: Google tag (gtag.js) with product ID transmission on each page, product feed in Google Merchant Center and configured campaign in Google Ads. Bitrix integrates with all three without installing third-party plugins.

Setting up Google tag with product parameters

Standard Google tag (gtag.js) needs to be supplemented with remarketing parameters. On product page transmit:

gtag('event', 'view_item', {
  send_to: 'AW-XXXXXXXXX/XXXXXXXX',
  value: <?= $arResult['CATALOG_PRICE_1']['PRICE'] ?>,
  items: [{
    id: '<?= $arResult['ID'] ?>',
    google_business_vertical: 'retail'
  }]
});

Variables from $arResult are substituted in PHP-template of bitrix:catalog.element component. Product ID is $arResult['ID'] (infoblock element ID). Make sure this same ID is used in Merchant Center feed (field id in XML).

On cart page (bitrix:sale.basket.basket) transmit products array:

gtag('event', 'begin_checkout', {
  send_to: 'AW-XXXXXXXXX/XXXXXXXX',
  items: [
    <?php foreach ($arResult['ITEMS'] as $item): ?>
    {id: '<?= $item['PRODUCT_ID'] ?>', quantity: <?= $item['QUANTITY'] ?>},
    <?php endforeach; ?>
  ]
});

Product feed in Google Merchant Center

Feed is created via built-in Bitrix export or custom PHP script. Required fields for remarketing:

Field Source in Bitrix
id b_iblock_element.ID
title b_iblock_element.NAME
description b_iblock_element.DETAIL_TEXT
link DETAIL_PAGE_URL component
image_link CFile::GetPath($PREVIEW_PICTURE) + domain
price b_catalog_price.PRICE + currency
availability by b_catalog_product.QUANTITY > 0

Save feed in Google XML format (/upload/google_feed.xml) and update by agent every 6–12 hours. In Merchant Center, add data source by URL.

Remarketing audience in Google Ads

After setting up Google tag, Google Ads automatically creates audience "Product page visitors". For dynamic remarketing, use audience "Product page visitors who haven't made purchase" — add exclusion condition for buyer audience (event purchase).

Send purchase event on "Thank you page" via bitrix:sale.order.ajax component handler or in successful order page template:

gtag('event', 'purchase', {
  send_to: 'AW-XXXXXXXXX/XXXXXXXX',
  transaction_id: '<?= $orderId ?>',
  value: <?= $orderPrice ?>,
  currency: 'RUB'
});

What we configure

  • gtag.js tag with events view_item, add_to_cart, begin_checkout, purchase in component templates
  • Product feed for Google Merchant Center with update agent
  • Feed connection to Google Ads account via Merchant Center
  • Remarketing audiences and Dynamic Remarketing campaign in Google Ads
  • Field id match in feed and ID transmitted in gtag