How to create a XML feed for Google Shopping (Merchant)

How to configure a Google Merchant Center (GMC) feed for Google Shopping.

Creating A channel and defining the XML data format feed

If you are not familiar with how to create channels in Plytix, have a look at this article: Create a Channel

To work with the XML data format, have a look here: Define Data Format For XML Channels

Google Merchant feed references

Follow this link, to create a new: primary feed setup

Follow the required and optional guidelines for your product data specifications. Bear in mind that some product types or countries have special requirements, and this article will only go through the basic content requirements for the ability to serve ads.

Setting up your Merchant feed in Plytix

First, load your attributes and product list.

In this example we have loaded the attributes which are required by GMC. but you will have to specialize your product information based on your industry, product requirements, and country of sale.

  • ID
  • Title
  • Description
  • Link
  • Image link
  • Availability
  • Price
  • Brand
  • GTIN

Attributes

These are the attributes we have added to the feed from the PIM (1). Don't worry about the names not conforming with GMC requirements, we will fix that at a later step.

attributes for feed

Products

Add a 'Product list' containing the products you want to include to your feed (1).

products for feed-2

Formatting the Merchant feed

Navigate to the format tab, to set up the feed so it conforms with the specifications set by GMC (1). With the loaded attributes and product list, the feed is already generated to include the attribute data for each product (2).

Formatting the GMC feed

Examples on feeds for GMC

You can see full feed examples here, to learn how the feed should be formatted, click to download a RSS 2.0 example file or find it here. Refer to these examples as you work with setting up your feed.

The example for our sample feed looks like this:

example on feeds for GMC

Customize the feed to fit GMC specifications

The first part <?xml version="1.0" encoding="UTF-8"?> is automatically applied by the system.

Add and configure the rss node

Our first task is to add the rss node. We do that by clicking the '+ Add Node' button (1). We can then configure the node in the 'Settings' that pop up on the right side of the screen (2).

Configure the feed to fit gmc specifications

We start by giving the 'Node Tag' its name, which we will call "rss" (1). Then we need to add the additional information that we saw that came after rss in the example feed, that extra information is called 'node attributes'. A node attribute looks like this: xmlns:g and its value is: http://base.google.com/ns/1.0 We add that information in the 'Attribute' and 'Value' fields (2) and then select the '+ Add Attribute' button (3), then the attribute data will be added below (4). Finally press 'Save' at the top of the settings to add the Node to the Feed builder (5).

add and configure the rss node

Channel

Our next task is to add 'channel' as a sub nodes to the rss Node. We do that by adding a new node again (1). We set the 'Node Tag' to 'channel' (2), and then we declare a 'Parent node' for it (3). In order to add it directly below the rss node (4).

channel

Adding leaf nodes

We can now add title, link and description nodes. These three nodes must all share the '<channel>' node as parent and they must be created as Leaf nodes.

Since we will be making 3 subnodes/child nodes we want to work a little faster, so we can click the 'subnode' icon, to create a subnode directly under the node which icon we press, and in this case 'channel' (1). We can then add the Node tag (2), then we activate the 'Leaf Node' switch (3), which gives us a field where we can write the value (4). Since we created the node as a direct subnode to channel, it will be generated there, when we press 'Save' (5). We do this individually for all three nodes, don't mind the 'LEAF' text in front of your node values, they will not be included in the feed.

adding leaf nodes

Modifying your Products / Items

As you have maybe noticed in the examples above, the hierarchy for the 'products' and 'product' nodes are not conforming to the specifications in the example feed. So we have to go in to the settings of 'products', by clicking the settings icon (1) and change its 'Parent node' to Channel (2) to move both nodes under channel.

modifying your products  items

Within the PIM system, Products are called "product", but for GMC a product is called "Item". Therefore we must change the naming from "product" to "item". We do that by clicking the purple nodes option icon (1). Then we change the 'Node Tag' to "item" (2).

changing product name to item

What GMC does, is to list all their items one after the other, and not within an overall "Items" hierarchy lvl. So we actually have to delete the 'Products' node that all our items currently are within. We do that by clicking the red 'X' next to the Node (1).

Screenshot 2019-05-29 at 10.16.20-1

Our item node now got moved up a hierarchy level as the Products node got deleted, and we can now see that our feed content and hierarchy is starting to look a lot like what GMC wants it to look like:

comparison-1

Changing the individual attributes

We can now start changing our attribute 'Node Tags' so they match with GMC's naming convention. We need to change their names to this:

SKU = g:id, Label = g:title, Description = g:description, product landing page = g:link, Hero Image = g:image_link, Availability = g:availability, Price = g:price, Brand = g:brand, GTIN =g:gtin

We add this change by clicking the option icons for our attribute nodes individually (1), and then change their 'Node Tags' (2), and a preview of the output name will display below the attribute names (3).

Changing the individual attributes

Completed feed

Our feed is now completed. All our necessary data is there, our hierarchy levels are in order, and naming conventions are adjusted for GMC. Here is a comparison from what GMC needs, how it looks like in the feed builder, and how the output looks like in the preview for your feed:

completed feed

Processing

Click the 'PROCESS NOW' button at the top right of the page (1), and select the link that becomes available to your feed (2). Copy the link and apply it to your GMC account.

Processing