Variants in your product data: how Google and AI assistants understand size and colour
If you sell a T-shirt in three sizes and three colours, that is one product to you and nine to Google. Each variant has its own price, stock level and often its own barcode. A few extra fields in your product data let machines see how they fit together: which variants belong to one product and how they differ.
Why it matters
- Google writes that for a selected variant it wants to show the right image, price and availability, and that a shopper can add that variant to the cart.
- In Google Merchant Center, a group code for variants (
item_group_id) is required for variants in free listings. - OpenAI writes that ChatGPT shopping uses, among other things, structured product data. Read more in How does ChatGPT decide which products to show?
Nobody promises that this data will actually appear in search results. But if all variants are mixed up, or only the first one is listed, a machine cannot tell that the blue size M exists or is in stock.
Curious how your store does? Run the free scan: you see it within a minute, no account needed.
How Google wants to see variants
Google uses a parent product, ProductGroup, with the variants underneath as normal products (Product). Three fields belong to the group:
productGroupID: your own code for the whole group, for example the item number of the main product.variesBy: how the variants differ. Google lists colour (color), size (size), age (suggestedAge), gender (suggestedGender), material (material) and pattern (pattern).hasVariant: the list of variants.
Data that applies to all variants, such as the brand, goes on the group once. Each variant gets its own product data: name, image, colour or size, a unique code (sku or a GTIN such as gtin13) and an offer with price and availability.
{
"@context": "https://schema.org",
"@type": "ProductGroup",
"name": "Cotton T-shirt",
"brand": { "@type": "Brand", "name": "Example Basics" },
"productGroupID": "TS-100",
"variesBy": ["https://schema.org/size", "https://schema.org/color"],
"hasVariant": [
{
"@type": "Product",
"name": "Cotton T-shirt, blue, size M",
"sku": "TS-100-BL-M",
"gtin13": "8712345678913",
"color": "Blue",
"size": "M",
"image": "https://www.example-shop.nl/img/ts-100-blue.jpg",
"offers": {
"@type": "Offer",
"url": "https://www.example-shop.nl/t-shirt?colour=blue&size=m",
"price": "24.95",
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock"
}
}
]
}
This example shows one variant; in your real data, all of them go under hasVariant. Only use real barcodes of your products.
One page or a page per variant
Google distinguishes two set-ups:
- All variants on one page. There is one main address for the whole group, usually without a preselected variant. Each variant must also open with its own address, for example by adding
?colour=blue&size=m. - A separate page per variant. There is no main address. Each page has complete product data for the variants on that page.
Google recommends putting the product data in the HTML the server sends straight away. According to Google, data that only appears later through JavaScript can make the page read less often and less reliably.
Rules for Google Merchant Center
If you use a product feed for Merchant Center, the same idea applies with other names:
- Each variant is a separate product with its own id. The T-shirt in three sizes and three colours is nine products.
- All variants get the same
item_group_id. Google recommends the item number of the main product. - Upper and lower case do not count: abc123 and ABC123 are the same to Google. Do not reuse a code for another product, and do not change it.
- Give each variant the attributes in which it differs, such as
colorandsize. Do not submit variants without them. - Each variant has its own address, and what that page shows must match the variant.
- A set of different products, such as a jacket with trousers, is not a variant and gets no
item_group_id.
What you can do yourself
- Open a product with variants in your store and pick another colour or size. Does the address in the address bar change? If not, ask your developer or app whether it can.
- Check that each variant has its own item number and, if you have one, its own barcode. Read why in GTIN vs EAN: why your barcode belongs in your product data.
- Look at the page's product data with Google's Rich Results Test. How that works is in How to check and fix your product data. If you only see one product without variants, the group is missing.
- Put the colour or size in the name of each variant too. Tips are in Product titles and descriptions AI assistants can use.
- If you use Merchant Center, check that all your variants share the same
item_group_id.
The free Shelv scan shows which product data an AI assistant finds on your page today.
How does your product page score?
Paste the address of a product page into the free scan. Within seconds you see what AI assistants can and cannot read.
Read next
- How to check whether ChatGPT can read your online store, in five steps
- AI SEO and GEO for online stores: how to get found in ChatGPT, Gemini and Perplexity
- Shipping and return details in your product data: how to show them to Google and AI assistants