How to Set Up Product Variants in a Feed for Facebook and Google

Christian Gerdes

By , Founder ·

Illustration of a product card for a basic tee with color swatches and S, M and L sizes, with variant cards behind it

To set up product variants in a feed, keep every variant as its own item and give all variants of the same product the same group ID. That tells Facebook and Google the sizes and colors belong together, so they show them as one product instead of several. This post shows what that looks like. If you're deciding whether a channel should get every variant or one row per product, read when to merge product variants in a feed.

You might have been in situations where you wanted to remove product variations from your product feeds and only keep the so-called master product. But that is not the right way to handle product variations when working with Facebook and Google shopping product feeds.

There are a lot of different sales channels out there having different requirements for their product feeds. This article focuses on Facebook product feeds and Google Shopping feeds.

Different product types

Depending upon your e-commerce platform, product types may be named differently, but it basically boils down to two types: simple and variable products. A simple product is, as the name indicates, a product only sold in one shape or form. E.g. a book. On the other hand, a variable product is a product that has multiple variations like a t-shirt that is sold in a variety of colors (white, black, gray, etc.). A variable product can be considered as a wrapper of products and should not be seen as an actual product for multiple reasons:

  • It’s a technical abstraction and not an actual product
  • You can’t buy a t-shirt (abstraction) without choosing a color (variation)
  • The variations hold the price, GTIN, quantity, etc.
  • The variable product can have a price but it’s derived from its variations (often the cheapest variation takes precedence)

Wrong configurations

Every now and then new customers remove product variations from especially their Facebook and Google product feeds because they’ve had prior configuration issues causing them to do so in order to prevent products (e.g. with three variations) being listed as three separate products. This is the primary reason people choose to exclude variations. Sure, you wouldn’t want to have the same product listed multiple times, but the solution is in the configuration and you won’t have to exclude anything.

Almost every sales channel that Feedr supports handles product variations the recommended way but sometimes you run into channels that don’t. In these cases, it might make sense to perform some sort of product exclusion to achieve the desired result but you should always be skeptical when excluding variations.

Without going too much into the technical details of how each product feed is built, I think it’s important to explain what a correctly configured xml product feed looks like in terms of handling product variations.

This is the corresponding xml for both a simple and 
variable product with two variations.

<items>
   <item>
      <id>1</id>
      <title>Book</title>
      …
   </item>
   <item>
      <id>2</id>
      <title>T-shirt</title>
      <color>White</color>
      <item-group-id>UNIQUE GROUP ID</item-group-id>
      …
   </item>
   <item>
      <id>3</id>
      <title>T-shirt</title>
      <color>Black</color>
      <item-group-id>UNIQUE GROUP ID</item-group-id>
      …
    </item>
</items>

In the example above, you can see that the two variations are grouped using the item-group-id field. The field instructs Facebook and Google (among others) to group all items sharing the same value into a single product. The item-group-id doesn’t exist on the book item because that doesn’t have any variations. If variations are listed multiple times, it almost certainly has to do with a missing item-group-id field!

Facebook Business Manager

Below are two screenshots that demonstrate the effect of not using item-group-id and the right way things should look in Facebook Business Manager after they’ve imported your product feed.

Overview of items in Facebook Business Manager not using the item-group-id field. Wrong configuration where each variation is listed on its own
Overview of items in Facebook Business Manager not using the item-group-id field. Wrong configuration where each variation is listed on its own
Overview of items in Facebook Business Manager using the item-group-id field to group variations. Right configuration and how things should look.
Overview of items in Facebook Business Manager using the item-group-id field to group variations. Right configuration and how things should look.

Google Merchant Center

Below are two screenshots that demonstrate the effect of not using item-group-id and the right way things should look in Google Merchant Center after they’ve imported your product feed.

Overview of items in Google Merchant Center not using the item-group-id field. Wrong configuration where each variation is listed on its own (no item-group-id specified)
Overview of items in Google Merchant Center not using the item-group-id field. Wrong configuration where each variation is listed on its own (no item-group-id specified)
Overview of items in Google Merchant Center using the item-group-id field to group variations. Right configuration and how things should look with values in the item-group-id column.
Overview of items in Google Merchant Center using the item-group-id field to group variations. Right configuration and how things should look with values in the item-group-id column.

Feedr supports this out of the box so you never have to worry about variations being listed multiple times.

Frequently asked questions

Can I exclude product variants from my Google Shopping feed?

Yes, but most stores shouldn't. Google wants each size and color as its own item with the same item_group_id, so a search for a black tee in size M can match the exact variant. Exclude only the variants you can't sell, for example sold out sizes. In Feedr, a filter rule removes just those variants and keeps the rest of the product.

Why does Meta show all my color variants as one product?

Because they share one item_group_id, and Meta groups items with the same group ID into one product. To show each color as its own product in your catalog ads, give each color its own group ID, for example the product ID plus the color. In Feedr, you can change the item_group_id that your Meta feed sends, and your Google feed keeps the normal grouping.

How do I structure a feed for products with several options, like rings with sizes and metals?

Add one item for each combination, for example size 52 in gold and size 52 in silver. Give all of them the same item_group_id, and fill in size and material on every item. Then each item has its own price and stock, and Facebook and Google show the options under one product.