As digital marketers, we often leverage the power of Yoast’s WooCommerce SEO premium plugin to enhance our product visibility on search engines like Google. Nevertheless, I stumbled upon a slight hitch over the weekend in their usually rock-solid setup. While the plugin does an excellent job of optimizing the main product page, it all boils down to product variations. Specifically, Yoast does not automatically include the availability of the different product variations in the metadata. Therefore, we must manually add the availability of each product variation to ensure that our eCommerce pages are optimized to their fullest potential.
Root Cause Analysis
Upon delving deeper into the issue, I realized that the disconnection lay in the availability status of products. The discrepancy arose when Google’s Merchant Center found a mismatch between the availability status listed in a store’s product feed and the availability information it could ascertain from the product page. This inconsistency led to the products being delisted, thereby curtailing traffic from Google Shopping ads.
Yoast reports the parent product in stock, but says nothing about variation availability
The default output from Yoast, when using their WooCommerce SEO plugin, looks like this:
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Product",
"@id": "https://example.com/product/#product",
"name": "Product Name (Condition)",
"url": "https://example.com/product/",
"description": "Product Description",
"image": {
"@id": "https://example.com/product/#primaryimage"
},
"sku": "PRODUCT-SKU",
"offers": [
{
"@type": "AggregateOffer",
"lowPrice": "lowest price",
"highPrice": "highest price",
"offerCount": "number of offers",
"priceCurrency": "currency",
"availability": "http://schema.org/InStock",
"url": "https://example.com/product/",
"seller": {
"@id": "https://example.com/#organization"
},
"@id": "https://example.com/#/schema/aggregate-offer/offer-id",
"offers": [
{
"@type": "Offer",
"@id": "https://example.com/#/schema/offer/offer-id",
"name": "Product Variant",
"url": "https://example.com/product/?attribute1=value1&attribute2=value2",
"priceSpecification": {
"@type": "PriceSpecification",
"price": "price",
"priceCurrency": "currency",
"valueAddedTaxIncluded": true
},
"sku": "VARIANT-SKU",
},
{
"@type": "Offer",
"@id": "https://example.com/#/schema/offer/offer-id",
"name": "Product Variant",
"url": "https://example.com/product/?attribute1=value2&attribute2=value3",
"priceSpecification": {
"@type": "PriceSpecification",
"price": "price",
"priceCurrency": "currency",
"valueAddedTaxIncluded": true
},
"sku": "VARIANT-SKU",
}, // More offers...
]
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "average rating",
"reviewCount": "number of reviews"
},
"review": [
{
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"bestRating": "best rating",
"ratingValue": "rating",
"worstRating": "worst rating"
},
"author": {
"@type": "Person",
"name": "Reviewer's Name"
},
"reviewBody": "Review Text",
"datePublished": "Review Date",
"@id": "https://example.com/#/schema/review/review-id",
"name": "Review Title"
} // More reviews...
],
"mainEntityOfPage": {
"@id": "https://example.com/product/"
},
"brand": {
"@type": "Brand",
"name": "Brand Name"
},
"color": [
"Color 1",
"Color 2", // More colors...
]
}
]
}
The problem with this was that not all variations were in stock, but Google thought they were because the AggregateOffer was reporting to be in stock. Effectively resulting in a mismatch.
But fear not! There’s a nifty workaround to this hurdle that comes in the form of a straightforward plugin extension that optimizes the feature. Now, let’s delve into how you can extend Yoast Schema output to incorporate product variations and their availability.
Understanding Schema Output
Before we dive in, it’s crucial to grasp what schema output refers to. In a nutshell, this is the semantic vocabulary of tags that you can add to your HTML to boost how search engines interpret and represent your page in search results.
If you’re looking to catapult your WooCommerce website to the top of search engine results page (SERPs), then understanding schema markup is crucial. Let’s dive into what schema markup is and how it conveys vital website data to search engines.
Schema Markup, or structured data, is a form of microdata that you add to your website’s HTML. This extra layer of information gives search engines a better understanding of your content. This extra context is crucial when it comes to enhancing your visibility on SERPs and boosting click-through rates (CTR).
“Schema markup helps translate your website content into the language of search engines, offering them the right cues to understand, index and feature your site effectively.”
So, where does WooCommerce and Yoast come in? These tools can greatly simplify your work with schema markups. When you combine the powerful e-commerce solution of WooCommerce with the SEO-enhancing capabilities of Yoast, the results can be dramatic. Yoast has a built-in feature for adding schema to your website, simplifying the process and ensuring it’s implemented correctly. With WooCommerce, each product on your site can have its own schema, detailing aspects like price, stock, and reviews.
- With Yoast, you can automatically generate valid schema markup for your pages and posts.
- When using WooCommerce, it’s easy to add extensive schema for individual product pages, providing more in-depth information to search engines and enhancing your product’s visibility in SERPs.
Fusing the functionality of WooCommerce and Yoast, you can create an SEO powerhouse that can significantly improve your website’s search engine performance. In the following sections, we’ll delve deeper into how you can extend Yoast Schema output for product variations and add availability information. Stay tuned!
Why Should You Extend the Schema?
In a digital world where search engines play an integral role in determining your online visibility, extending schema for product variations has become a necessity. But why? It’s all about providing rich and detailed information that allows search engines to better understand and present your products. And that’s not all. Including product availability in your Yoast schema can be an absolute game-changer!
Presenting all your product variations within the schema effectively acts as an invitation to search engines. By offering an organised and in-depth understanding of what you have available, you’re enabling them to better index and present search results related to your product. Think of it as you being the ultimate tour guide for search engines through your product catalogue.
Moreover, adding availability to that equation throws a spotlight onto your stock status, creating better opportunities for matching search queries of users looking to buy right now. This can result in improved visibility, more organic clicks, and ultimately, more sales. Now, isn’t that a result we all want?
“Remember, extending your Yoast schema to include product variations and availability is akin to enabling search engines to better champion your product. It enhances your e-commerce site’s discoverability and aligns with users’ real-time shopping demands.”
Now, you might be wondering how to go about enhancing your Yoast schema to cater to product variations and include availability. No worries, we’ve got you covered. Let’s navigate through the process together.
Extending WooCommerce Schema—The How
Normally, Yoast’s WooCommerce SEO premium plugin provides a schema markup for products sold online, but it doesn’t account for every aspect of every product. Specifically, the default setup does not handle the availability of each product variation separately. So to solve our problem, we need to make a small plugin which reads the stock status of the variation and adds a valid stock status to the structured data.
The recommended way to add this code to your site is to make it into a plugin, and there might be customization you need to make to the script to make it work in your situation.
The result of this small plugin, is a structured data snippet that looks like this on product variations
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Product",
"@id": "https://example.com/product/#product",
"name": "Product Name (Condition)",
"url": "https://example.com/product/",
"description": "Product Description",
"image": {
"@id": "https://example.com/product/#primaryimage"
},
"sku": "PRODUCT-SKU",
"offers": [
{
"@type": "AggregateOffer",
"lowPrice": "lowest price",
"highPrice": "highest price",
"offerCount": "number of offers",
"priceCurrency": "currency",
"availability": "http://schema.org/InStock",
"url": "https://example.com/product/",
"seller": {
"@id": "https://example.com/#organization"
},
"@id": "https://example.com/#/schema/aggregate-offer/offer-id",
"offers": [
{
"@type": "Offer",
"@id": "https://example.com/#/schema/offer/offer-id",
"name": "Product Variant",
"url": "https://example.com/product/?attribute1=value1&attribute2=value2",
"priceSpecification": {
"@type": "PriceSpecification",
"price": "price",
"priceCurrency": "currency",
"valueAddedTaxIncluded": true
},
"sku": "VARIANT-SKU",
"availability": "https://schema.org/InStock"
},
{
"@type": "Offer",
"@id": "https://example.com/#/schema/offer/offer-id",
"name": "Product Variant",
"url": "https://example.com/product/?attribute1=value2&attribute2=value3",
"priceSpecification": {
"@type": "PriceSpecification",
"price": "price",
"priceCurrency": "currency",
"valueAddedTaxIncluded": true
},
"sku": "VARIANT-SKU",
"availability": "https://schema.org/OutOfStock"
},
// More offers...
]
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "average rating",
"reviewCount": "number of reviews"
},
"review": [
{
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"bestRating": "best rating",
"ratingValue": "rating",
"worstRating": "worst rating"
},
"author": {
"@type": "Person",
"name": "Reviewer's Name"
},
"reviewBody": "Review Text",
"datePublished": "Review Date",
"@id": "https://example.com/#/schema/review/review-id",
"name": "Review Title"
}
// More reviews...
],
"mainEntityOfPage": {
"@id": "https://example.com/product/"
},
"brand": {
"@type": "Brand",
"name": "Brand Name"
},
"color": [
"Color 1",
"Color 2",
// More colors...
]
}
]
}
WooCommerce Schema Markup – Extending Further Product Variations
Your business thrives when consumers can find what they’re looking for—to the smallest detail. Extending the schema with product variations, from size and color options to specific model types, increases the likelihood that users land on your page when their search is specific. Moreover, adding the availability of product variations within the WooCommerce schema provides additional value. A user who sees that the exact variation they want is in stock is more motivated to visit the buying page directly.
So, equipping your Yoast Schema with product variation details and availability status is not just about ticking a box—it’s a strategic move in your SEO gameplay. It’s about crafting a savvier, more comprehensive digital presence that brings consumers closer to your offerings. Only by demonstrating exact product availability can you truly cater to search intent and usher a buyer smoothly from Google search to your sales page. Implement it today and watch your user experience, and consequently, your sales, climb to impressive new heights.