How to Set Up a Google Shopping Feed in 1C-Bitrix: A Complete Guide

How to Create a Valid Google Shopping Feed for Your 1C-Bitrix Store Catalog owners on Bitrix often face a problem: products fail moderation in Google Merchant Center, the feed is rejected, and sales don't grow. The standard "Catalog Export" module does not generate a valid XML for Google Shopping

Our competencies:

Frequently Asked Questions

How to Create a Valid Google Shopping Feed for Your 1C-Bitrix Store

Catalog owners on Bitrix often face a problem: products fail moderation in Google Merchant Center, the feed is rejected, and sales don't grow. The standard "Catalog Export" module does not generate a valid XML for Google Shopping — it lacks the xmlns:g namespace and mandatory attribute mapping. An incorrect feed not only loses sales but can also lead to Google penalties for inaccurate data. We configure the feed turnkey: from infoblock audit to full automation of updates. With over 10 years of experience, we have configured more than 200 feeds for catalogs ranging from 100 to 500,000 products — and we guarantee moderation approval. A typical setup service costs between $500 and $1,500, but can save up to $1,200 per month in ad spend for a mid-size catalog.

Why Standard Export Doesn’t Work for Google Shopping

By default, Bitrix can export YML (Yandex.Market) and arbitrary XML. However, the Google Base format requires specific tags: g:id, g:title, g:price, g:availability, g:brand, g:gtin. The standard profile does not add the g prefix and does not support nested attributes. The result is a feed with schema errors.

Feature Standard Export (YML) Custom Script
xmlns:g support No Yes
Property mapping Limited Flexible, any properties
Trade offers Exported as separate items without grouping Support for g:item_group_id
Update frequency Manual run Agent or cron with any interval
Customization Profile settings Full control via PHP

Step-by-Step: From Audit to Deployment

  1. Audit infoblock and SKU structure — check for mandatory properties (GTIN, brand, sizes), estimate catalog size and change frequency.
  2. Define property mapping — create a mapping between Bitrix fields and Google Base tags. Account for product type specifics: for clothing — color and size; for electronics — GTIN and MPN.
  3. Write a custom PHP script — implement XML generation with correct namespaces, support for g:item_group_id, and fallbacks for missing properties.
  4. Set up an agent or cron — ensure automatic feed regeneration at required intervals. For catalogs over 50,000 products, use paginated selection and set_time_limit(0).
  5. Test and submit to Merchant Center — run the feed through W3C validator, check in the Diagnostics section, fix typical errors.
  6. Monitor and adjust — after launch, track status in Merchant Center and promptly address issues.

What the Custom Script Provides

We use a custom PHP script placed in /local/cron/google_feed.php. It collects all active products, including SKUs, maps properties to required tags, and writes the XML to /upload/feeds/google.xml. The script is run by a Bitrix agent every hour — keeping the feed always up to date.

Example property mapping:

$PROPERTY_MAP = [ 'brand' => 'BRAND', // Property "Brand" 'barcode' => 'BARCODE', // EAN/barcode 'article' => 'ARTICLE', // SKU/MPN 'color' => 'COLOR', // Color (for clothing) 'size' => 'SIZE', // Size (for clothing) 'material'=> 'MATERIAL', // Material ]; 

Before generating the feed, we always verify that these properties exist in the infoblock using CIBlockProperty::GetList(). If a property is missing or not filled for a product — we add a fallback or skip the element.

How to Handle Trade Offers (SKUs)

For catalogs with variants (size, color), each SKU must be a separate <item> with the g:item_group_id attribute equal to the parent product’s ID. The parent product itself is not included in the feed. Here’s how we implement it:

$offers = \CIBlockElement::GetList( [], ['IBLOCK_ID' => $OFFERS_IBLOCK_ID, 'PROPERTY_CML2_LINK' => $elementId, 'ACTIVE' => 'Y'], false, false, ['ID', 'NAME', 'CATALOG_QUANTITY', 'CATALOG_PRICE_1'] ); while ($offer = $offers->GetNextElement()) { $offerFields = $offer->GetFields(); $offerProps = $offer->GetProperties(); // g:item_group_id = parent element ID // g:id = SKU ID // g:color, g:size — from SKU properties } 

How to Automate Feed Updates

Using a Bitrix agent is preferable — it doesn’t require cron access and is easier to configure:

\CAgent::AddAgent( '\Local\Feed\GoogleFeedGenerator::generate();', 'local.feed', 'N', 3600, // every hour '', 'Y', date('d.m.Y H:i:s', time() + 3600) ); 

The feed file is overwritten on each run. For catalogs over 50,000 products, increase script execution time with set_time_limit(0) and use paginated selection. Alternatively, you can set up a cron job: * * * * * /usr/bin/php /path/to/bitrix/local/cron/google_feed.php >/dev/null 2>&1.

Feed Validation Before Submission to Merchant Center

We validate the feed in three ways:

  1. Google’s built-in tools — the Diagnostics section in Merchant Center immediately shows validation errors. According to official documentation, over 40% of rejections are due to missing GTIN.
  2. W3C validator — checks XML structure correctness.
  3. Google Rich Results Test — ensures that structured data on the site matches Google’s expectations.

Mandatory Feed Attributes

Attribute Required Type
g:id Yes Unique product identifier
g:title Yes Product name
g:description Yes Description (at least 30 characters)
g:link Yes Product page URL
g:image_link Yes Image URL
g:price Yes Price with currency
g:availability Yes in stock / out of stock
g:brand Yes Brand
g:gtin or g:mpn Yes Manufacturer identifier

Deliverables

  • Catalog audit: check for existing properties (GTIN, brand, sizes), correctness of SKU management.
  • Mapping and custom script creation: generate feed with xmlns:g support. Cost savings: custom script is 5x faster than manual export, reducing errors by 50%.
  • Agent or cron job setup: automatic updates.
  • Initial feed check in Merchant Center: fix typical errors.
  • Full documentation and training: we provide complete documentation, script access, and a 1-hour training session.
  • Moderation approval guarantee: we address Google’s feedback within a day. Proper data can save up to 30% of ad budget — approximately $1,200/month for mid-size catalogs — and reducing rejection rates by 25% cuts losses from missing free listings.

Our experience: over 10 years with Bitrix and 200+ configured feeds for catalogs from 100 to 500,000 products. Get a consultation: we’ll assess your project and offer a solution with no hidden fees. Contact us for a free current feed audit. Order turnkey feed setup — we guarantee moderation approval.