Skip to main content

Product Variants Example

This page demonstrates ProductGroup structured data with product variants. The structured data helps Google understand which products are variations of the same parent product.

Example: Training Course Packages

The example below shows three package variants (Basic, Premium, Complete) that vary by:

  • Size: Basic, Premium, Complete
  • Material: Digital, Hybrid

Single-Page Implementation

This example uses a single-page approach where all variants are selectable on the same page (usually via query parameters like ?package=basic&type=digital).

Note: This page handles query parameter variations gracefully. Abbreviations like "digi" (for digital) and "hy" (for hybrid) are automatically normalized to their full forms.

Nested Variants Structure

This example uses the nested variant structure (hasVariant), which is the recommended approach as it's more compact and natural.

Implementation Details:

  • ProductGroup with productGroupID: BMT-PKG-001
  • Three variants, each with unique SKU
  • Variants vary by size and material
  • Each variant has its own offer with pricing
  • Common properties (brand, material, audience) at ProductGroup level
  • Query parameters are normalized to handle typos and abbreviations

Package Variants

Biomagnetism Training - Basic Package

Basic package includes core training materials, 6 months access, and digital certificate. Perfect for beginners.

$695

BasicDigital
Select This Variant

Biomagnetism Training - Premium Package

Premium package includes all basic features plus extended access, bonus materials, and priority support. Best value for serious learners.

$945

PremiumDigital
Select This Variant

Biomagnetism Training - Complete Package

Complete package includes everything in premium plus physical materials, lifetime access, and one-on-one consultation. Ultimate learning experience.

$1,295

CompleteHybrid
Select This Variant

Code Example

import { generateProductGroupSchema } from '@/lib/seo';

const productGroupSchema = generateProductGroupSchema({
  name: 'Biomagnetism Training Course Package',
  productGroupID: 'BMT-PKG-001',
  variesBy: [
    'https://schema.org/size',
    'https://schema.org/material',
  ],
  siteType: 'single-page',
  variantStructure: 'nested',
  variants: [
    {
      sku: 'BMT-PKG-001-BASIC',
      name: 'Biomagnetism Training - Basic Package',
      image: COURSE_IMAGES.online.primary,
      url: 'https://biomagnetismtherapytraining.com/product-variants-example?package=basic&type=digital',
      size: 'Basic',
      material: 'Digital',
      offers: {
        price: 695,
        priceCurrency: 'USD',
        availability: 'https://schema.org/InStock',
        url: 'https://biomagnetismtherapytraining.com/product-variants-example?package=basic&type=digital',
      },
    },
    // ... more variants
  ],
});

Testing

To test this implementation:

  1. Use Google Rich Results Test to validate the structured data
  2. Check that all variants are properly nested under ProductGroup
  3. Verify that each variant has a unique SKU
  4. Ensure all required properties are present
  5. Test with Google Search Console URL Inspection tool
  6. Try different query parameter combinations (including abbreviations like "digi" and "hy")

Query Parameter Handling

This page demonstrates robust query parameter handling:

  • Normalization: Abbreviations are automatically normalized (digi → digital, hy → hybrid)
  • Error Handling: Invalid parameters show a helpful message instead of crashing
  • Visual Feedback: Selected variant is highlighted when query parameters match
  • SEO-Friendly: All variant URLs are included in structured data for proper indexing
Save $50-$56
Exclusive Discount Available - Limited Time Offer!
Get the same training with $50-$56 savings - Only through our affiliate link