How to create an XML-feed in WooCommerce for Google Merchant Center (instruction)

Google Merchant Center is a way to attract new customers to the online store and increase profits. All you have to do is upload product information to the Google Merchant Center, and millions of users from all over the world will learn about them. You can upload data about your products in several ways, one of which is creating an XML file. In this article I will talk about how to create such a file for your online store on WooCommerce.

Plugin installation

Go to "Plugins" - "Add New" and enter "xml for merchant". Install the plugin XML for Google Merchant Center. (An alternative way is to download the archive XML for Google Merchant Center and install it using "Plugins". - "Add New" - the "Upload Plugin" button at the top of the page). Activate this plugin in the admin panel of your site.

Plugin configuration Google Merchant Center

The first thing to do after installation is to go to the Export Google Merchant Center tab. I will briefly talk about the most important parameters.

Select feed. The plugin supports the ability to create multiple XML files (channels), for each of which you can set your own, individual parameters. Having another feed can be useful if you transfer data not only to Google, but also to other trading platforms.

Setting xml-file

Also, several feeds may be needed when your online store contains a lot of products and as a result, the size of one feed exceeds 60 MB (in such cases, you may need to split one feed into several).

By default, when you go to the "Export Google Merchant Center" section, the settings for the first feed are displayed. To configure another feed, select it in the drop-down list and click "Select feed". Please note that by default you can create no more than 3 feeds, however, if necessary, this value can be increased or decreased. To do this, open the wp-config.php file of your site and write down the following constant xfgmc_ALLNUMFEED with a value from 1 to 99. In the example below, we changed the number of feeds from three to five:

define('xfgmc_ALLNUMFEED', '5');

Automatic file creation. If "Disabled" is selected, the feed will not be created. The first thing you need to do is change this setting. I recommend setting the value "Daily".

Update feed when updating products.The name speaks for itself. Checking this box allows you to almost instantly update the XML feed, even with minor changes, without having to load the server.

Please note that if you selected "off" in the previous item "Automatic file creation", this option does not make sense, since the XML-feed will not be updated.

See this short video to learn more:

Feed assignment. Purpose of application. This option makes it easy to distinguish between feeds. What you specify here will appear next to the XML feed file name.

Feed assignment

Whot export. Here you can choose whether to transfer all products to the xml-feed or is it limited to simple products.

Description of the product. Sets the source of the product description.

Shop name. Enter the name of your store. Please note that the symbol & (ampersand) cannot be used in this field.

The name of your data feed. This parameter has little effect, however, as in the previous paragraph, note that you can not use the symbol & (ampersand) in this field.

Target country. Select the country you want to sell products to. This option is very important for Google. Firstly, because with its help Google will understand exactly who to offer your products to. But that is not all. The fact is that in the formation of feed in different countries, different requirements can be imposed on the same products. The setting "Target country" will help Google understand - in accordance with the legislation of which country it is worth checking your products.

What kind of products do you sell? Indicate only the main category. If the list does not fit, select "Other".

Step export. This affects the speed of creating the XML feed, since the step value is the maximum number of products that the plugin is allowed to process in 70 seconds, while the cache files have not yet been created. If you are having trouble creating the XML file, try decreasing the value in this field first. Values greater than 500 can only be set on powerful servers.

Upload only the first variation. If this checkbox is selected, only the 1st variation will get into the XML-feed from the variable products.

upload only the first variation

Section "Other elements"

How it works? Very simple! For example, we need to add information about the material from which the product is made. We act as follows. Using "Products" - "Attributes" create the attribute "Color".

add global attr in woocommerce

Now, next to the "Color" element, select this attribute.

Customizing Feed Attributes

If we specify an attribute for the product, then the plugin takes this into account and adds it to the feed.

Add attr color in woocommerce

What should I do if in the drop-down list you can only select "None" or the product attribute is registered but not configured for the channel? With a 90% probability, you created a local attribute instead of a global one. For more information on how to work with global attributes correctly, see Article. "Global and local (custom) attributes in Woocommerce".

GTIN. To pass some parameters, you can use custom fields instead of attributes. In this case, you must specify the value of the meta field.

gtin source custom fields

In the example image, we substitute the barcode from an custom field my_custom_gtin.

Gender. For some parameters, the plugin has the ability to substitute default values. Let's look at an example of the Sex parameter. In the example below, the value of the plugin will check if the product has an attribute named "Human gender". If so, he will take this into account. If not, replace the "Female".

Section "Add Google Product Categories"

Unlike Yandex, Google does not directly support product categories. You need to manually compare your categories with the categories of products from the Google catalog. This is done as follows:

Go to the Google help page and download a list of all the categories that currently exist. there you will find detailed instructions on how to use this file and determine the numerical values of a category (id).

Suppose you have the category "Evening dresses" on the site. After downloading the file from the Google website and analyzing it, you have determined that the category that belongs to the branch is most suitable for you Apparel & Accessories > Clothing > Dresses [Одежда и аксессуары > Одежда > Платья]. This category, according to Google’s classification, corresponds to a value of 2271. Now you just need to register this value for all of your products that are in the evening gowns category. There are two ways to do this. You can edit product cards manually by filling in the "Google product category" field in each of them, or you can use the function of bulk adding categories.

We set up a Google category for all products included in the evening dress category.

To do this, in the "Add Google Product Categories" section, select the "Evening dresses" category with the mouse, enter the value 2271 in the special field below and click "Add New Category". Now, if you go to any product card from the evening dresses category, you can make sure that she has 2271.

Alternative way

You can compare categories differently. Go to "Products" - "Categories", select the one you need. And enter its identifier in the "Google product category" field.

google product category

In the example in the picture above, we specified id 5634.

The question arises: What happens if the Google product category field inside the product card contains 2271 and the category card contains 5634 in the field with the same name? Answer: 2271, because value in a product card has a higher priority. This is done if the product is included on your site in several categories, and you need to set the main category for Google.

Pay attention to the difference! In the first case, we massively added identifier categories at the product level. In the second - at the category level. Let me remind you that the level of goods is a priority. This means that in our example, the product will be have category 5634, not 2271!

Individual product settings for XML for Google Merchant Center

After activating the plugin XML for Google Merchant Center, the "Individual product settings for XML for Google Merchant Center" block is added to the product card. Using it, you can transfer product-specific parameters to the feed. The purpose of each parameter can be found in Google Help (a link to the corresponding help page is given in the description).
Individual product settings for XML for Google Merchant Center

After activating the plugin XML for Google Merchant Center a block is added to the product cards "Settings for XML for Google Merchant Center". Using it, you can transfer product-specific parameters to the feed. The purpose of each parameter can be found in Google Help (a link to the corresponding help page is given in the description).

Click on the "Save" button. If Automatic file creation is set to a value other than "Off". Complete feed assembly feed.

After the XML-feed is formed, a link will appear on the right, which should be indicated as a data source in the Google Merchant Center.

xml feed to google merchant center

This link will need to be specified in your personal account Google Merchant Center.

Рейтинг: 5

2023-10-24 / / 6 комментариев / Документация