Rudra Kasturi Inc.

Article · AEO

Product variant markup: how to group sizes and colours with ProductGroup

SUMMARY

Google's product variant documentation (last updated 8 September 2026) says to use ProductGroup with variesBy, hasVariant and productGroupID, to give each variant a unique ID such as sku or gtin, to make each variant preselectable through its own URL, and to put Product markup in the initial HTML for best results. The rollout is ours.

A jacket in four sizes and three colours is one product to a shopper and twelve to a catalogue. Google’s variant documentation (last updated 8 September 2026 as we read it) shows how to tell it which is which.

Best for: ecommerce teams with apparel, shoes, furniture, electronics, luggage or any product sold in variations.

Product variants: group with ProductGroup, give each variant an ID, preselect by URL, keep markup in the HTML

What Google says

  • Use the ProductGroup class with variesBy, hasVariant and productGroupID to group variants, in addition to Product structured data. This also makes products eligible for variant information in merchant listing experiences.
  • ProductGroup can hold properties common to all variants, such as brand and review information, plus the variant-determining properties, which reduces duplication.
  • variesBy names the aspects that differ, such as size or colour, using full schema.org URLs. hasVariant nests the variant products. productGroupID is the parent identifier, also called the parent SKU. Variants can alternatively carry inProductGroupWithID.
  • Each variant must have a unique ID in its markup, for example sku or gtin. Each product group must have a unique ID.
  • Add Product markup that meets the merchant listing or product snippet requirements as well.
  • Single-page sites: there must be one canonical URL for the whole ProductGroup, typically the base page with no variant preselected. Multi-page sites: there is no single canonical, and each page needs full, self-contained markup for its own entities.
  • Each variant must be preselectable through a distinct URL, for example with query parameters. That includes showing the right image, price and availability and letting the user add that variant to the cart.
  • Put Product markup in the initial HTML for best results. Script-generated markup can make Shopping crawls less frequent and less reliable, which matters for price and availability, so make sure your server can handle the extra crawl traffic.

What to do: step by step

StepOwnerTimeHow to checkDone when
1. Choose single-page or multi-pageEcommerce, developer30 minDo variants share a page or have their own pages?One model documented
2. List variant attributesMerchandiser1 hourSize, colour, material or pattern per productA table per category
3. Fix identifiersData team2 hoursUnique sku or gtin per variant, one parent ID per groupNo duplicate IDs
4. Build ProductGroup markupDeveloper3 hoursvariesBy, hasVariant, productGroupIDValidates on five sample products
5. Test variant URLsDeveloper, QA1 hourOpen each variant URL coldRight image, price and stock appear
6. Check the canonicalSEO30 minSingle-page: one base canonical. Multi-page: each page canonical to itselfRules match the model
7. Check initial HTMLDeveloper20 minView sourceProduct markup present without scripts

Common mistakes

  • Reusing one sku for every colour.
  • A variant URL that opens the default option, with the wrong price or image.
  • Pointing every variant canonical at one page on a multi-page site.
  • Building markup only with a script and ignoring crawl load.

Related: product data scorecard, canonical URLs and faceted navigation. Results are not guaranteed.

Sources