Two formats are available. Use one.
| File | Format | Output |
|---|---|---|
google-merchant-center.xml |
RSS 2.0 XML with the g: namespace |
/google-merchant-center.xml |
google-merchant-center-tab.xml |
Tab-delimited text | /google-merchant-center.txt |
google-merchant-center-tab-data-builder.xml |
Tab-delimited text, with Data Builder | /google-merchant-center.txt |
Register the feed#
In Merchant Center, add a product source of type Add products from a file, choose Enter a link to your file, enter the file URL (for example https://www.your-domain.com/google-merchant-center.txt) and set a daily fetch.
Fields#
In the XML file the attributes have the g: prefix (g:id, g:price). The text files use the plain names.
| Google attribute | Source | Notes |
|---|---|---|
| id | Product Code | The variant part’s code on variant rows |
| title | Name | Variant rows add the options, for example T-Shirt (Red, M) |
| description | Description | strip HTML |
| link | Product URL | Variant rows add ?Variant_ID= |
| image_link | Main Image | Image type main |
| additional_image_link | Additional Images | Images with no type. Up to 10, comma-separated in the text format. |
| availability | Availability | in_stock or out_of_stock |
| price | Price | 15.90 USD |
| sale_price | Sale Price | Left out when there’s no discount |
| brand | brand custom field |
Change to your brand field’s code if it differs |
| gtin | gtin custom field |
Left out when empty |
| mpn | SKU | Change to the mpn custom field, or remove, if your SKUs aren’t manufacturer part numbers |
| identifier_exists | identifier_exists custom field |
no for products with no GTIN or MPN. Left out when empty. |
| condition | Constant new |
|
| item_group_id | Item Group ID | The product code on variant rows |
| color, size, material, pattern | Attributes with those codes | Left out when the product has no such attribute |
| gender | gender custom field |
Clothing and accessories. Left out when empty. |
| age_group | age_group custom field |
Clothing and accessories. Left out when empty. |
| google_product_category | google_product_category custom field |
Left out when empty |
| product_type | Category Path | For example Household > Living Room > TV Stands |
| shipping_length, shipping_width, shipping_height | Shipping rules | With the store’s unit. Left out when not set. |
Custom fields: brand, GTIN, gender and more#
brand, gtin, identifier_exists, gender, age_group and google_product_category come from product custom fields with those codes. Most stores don’t have them yet. Before importing the feed:
- Import
google-merchant-custom-fields.xmlto create the fields on a Google Shopping tab of the product edit screen, or use your existing fields by changingsource=. - Fill in the values on each product. Put each variant’s GTIN on its variant part product.
Product identifiers and custom fields explains which identifiers Google needs, how to create and fill in the fields, and how to add other attributes such as custom_label_0.
Variants#
Google uses item_group_id plus at least one of color, size, material or pattern to tell variants apart. The files write each variant’s option prompt, the text shoppers see. If your attributes use other codes, change source= in those four lines. See Variants.
Data Builder version#
google-merchant-center-tab-data-builder.xml stores each product’s and variant’s tab-delimited row in a Data Builder field, google_merchant_data. It has no XML version, because stored XML rows use <record> and Google needs <item>.