Include variant options for Merchant Center in schema markup
I've shared recently that Google is looking to improve the schema markup. Their goal is to create a 1:1 parity with product feeds. Even before Google announced its goal during a Google Search Central podcast, I saw the writing on the wall.
That's why over the years we've added more and more Google Merchant Center fields to JSON-LD for SEO.
Variant data needed for Merchant Center
Some of the data we've been adding at the variant level includes the common and most expected fields. Those include fields such as price, product availability, and product condition among many others.
If Google does plan to replace product feeds for Merchant Center, we need to provide even more specific data at the variant level so that your products get approved quickly.
One of the many benefits of moving to the ProductGroup markup for Merchant Center, is that we can now pull variant options directly from Shopify and add the option values to your product markup.
Now what exactly does that mean and how does it work with Shopify?
Merchant Center wants to know things like the size, color, pattern, material, and gender. That's especially true for clothing where size is a required field in the product feed.
So much so that Google may throw errors in the Rich Results Testing Tool and Search Console when those fields are missing. Note: these currently don't throw errors but may be required in the future, so it's important to include the data just in case.
That means that the structured data needs to include these fields as well.
Yet, the way Shopify creates variants, it's easier said than done. Shopify makes it very difficult to pull things like size, color, and other options into the variant data. It's so complicated that even Shopify's native structured data used on Dawn and many other popular themes can't include this data.
Now, after years of trying to find a way around this in Shopify, I can say we finally have a solution.
Getting the variant option data
Though it is complicated for me to get the data, I've made it super simple for you!
In JSON-LD for SEO, go to the Product Settings.
Scroll down until you see the Product Option Names Specification section.
From here, enter any Option Names you want us to pull data for.
Please note there are specific fields in Schema.org and only a few of them are used by Google at this time. If and when more fields are used by Google, we'll try to expand these options.
A few tips when entering your Option Names:
- Only enter the option name (color), not the values (blue).
- Use the exact spelling used in the Option Name field in Shopify. These are not case-sensitive.
- Spaces and special characters are allowed as long as they match in Shopify.
- Enter as many option names as you have. For example, if you use color for one product and shade in another, enter both color and shade into the Color field.
Don't forget to test your structured data to make sure it's coming through as expected.
When in doubt, contact support and I'd be happy to check for you as well.
If you haven't installed JSON-LD for SEO yet or are still relying on your Shopify theme structured data, you're going to want to install JSON-LD for SEO to take advantage of adding these essential fields to your structured data.
FAQ's
Where do I find my option names?
Option Names are found by going to the Product and scrolling down to the variant section of your Product Admin. You may also set the option name when you upload products into Shopify.
In the above example, the option names are Color and Material. The option values are blue, red, purple, silk, and cotton.
Remember to only enter the option names into JSON-LD for SEO.
Can I include fields for those that aren't options in Shopify?
We'll automatically include values for those with options entered into the app.
If you don't have options or need another field added, I recommend you add custom linked data (the LD in JSON-LD) using our unique @id's.
Can we add more than 3 options?
Shopify only allows for 3 options per product at this time. However, given that Shopify is expanding its 100 variant limit to 2000 variants, I anticipate Shopify may expand the number of options available at some point.
As such, we've built this feature to allow for more than 3 options. If at some point your store can use more than 3 options, please let me know so I can test the data.
JSON-LD for SEO
Get more organic search traffic from Google without having to fight for better rankings by utilizing search enhancements called Rich Results.