Task: Implement microdata markup

Implement microdata markup

Ворклоги

Problem: Google requires mandatory fields for Product in structured data

Essence of the Error

Google Search Console outputs an error:

"A value for one of the following data elements is required: offers, review, or aggregateRating"

According to the Google documentation, for Product markup, it is mandatory to have at least one of the following:

  • offers — price and availability information
  • review — product review
  • aggregateRating — average rating

Without this data, the page will not be shown in rich search results (rich snippets).

Typical Case

An online store with "price upon request" or "made to order" products. Such products do not have a fixed price, so the developer does not pass offers — and receives an error from Google.

Solutions

1. Use offers without a specific price

Schema.org allows specifying priceSpecification without an exact price:

{
  "@type": "Product",
  "name": "Children's Playground Premium",
  "offers": {
    "@type": "Offer",
    "availability": "https://schema.org/InStock",
    "priceSpecification": {
      "@type": "PriceSpecification",
      "priceCurrency": "RUB"
    }
  }
}

2. Add aggregateRating or review

If there is a review system, use it:

{
  "@type": "Product",
  "name": "Children's Playground Premium",
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.5",
    "reviewCount": "12"
  }
}

3. Do not use Product markup for products without a price

If the product has no price and no reviews, you can use WebPage instead of Product. This will not provide rich snippets, but there will be no errors either.

Recommendation

For "price upon request" products, it is best to pass offers with availability, but without price. Google will accept such markup, and users will see information about product availability.

Besides that, there was also an error with the image paths — they were relative, but absolute ones were needed. Fixed it, sent for review.

Overall, the microdata is live and Google is gradually indexing it.