32 structured data items are invalid? How to fix

sailormouthsoap
New Member
4 0 0

Hi everyone,

I'm trying to improve my SEO and SemRush has picked up on a few issues that I have no clue how to fix. I've tried Google Search Central but being such a noob, it's all confusing me.

I have 25 product pages with this error message:

'Either 'offers', 'review' or 'aggregateRating' should be specified'

Here's an example of some affected pages:

https://soapcult.com.au/collections/best-sellers/products/coffin-tray-black-white-with-silver-hardwa...

https://soapcult.com.au/collections/best-sellers/products/devotion-body-soap

https://soapcult.com.au/products/full-moon-body-soap

Can anyone tell me what's gone wrong with these pages and how I can fix?

Thank you so much, Aliya.

0 Likes
KieranR
Shopify Partner
240 21 66

Basically follow what the warnings say, there is Metadata or JSON-LD improvements to make.

There might be some shortcuts like an app like "JSON-LD for SEO" but if there is existing schema you may need to investigate where this is coming from first. Most likely culprits are an app or a theme.

Usually the quickest way to fix most of it to nuke any schema in the theme (can be a bit technical) and then get that app I mentioned. 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
0 Likes
sailormouthsoap
New Member
4 0 0

Thanks KieranR,

Unfortunately that's all outside of my skillset, I'll most likely destroy my theme deleting things I don't understand.

From your experience, will these issues be really affecting my SEO or is it just best practice?

0 Likes
KieranR
Shopify Partner
240 21 66

A robust schema setup is important for ecom SEO, mostly because the extra pretty search results it enables. Things like review stars & prices seem to make a big difference. There are a number of case studies out there that indicate a lift in product page organic search performance after turning on a good schema setup. 

So yeah worth doing, not just a best practice thing.

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
0 Likes
sailormouthsoap
New Member
4 0 0

Ok great, thank you for your help

0 Likes
migreen06
Tourist
7 0 0

I have an issue with the structured data/ schema markup on my site. I added all of the fields and checked it with Google rich snippets checker and it said it was good. However, when I add it on the product pages, they have errors. In the "name" field for some reason, it shows as "default title" if there are no variables. The products that have variables show the size in the spot for the name. These are not the names I specified so I am not sure how they are being changed. I also don't know where to access this information. I have been adding the schema data to the end of the product description opposed to editing the code. Any help is greatly appreciated!

0 Likes
KieranR
Shopify Partner
240 21 66

@migreen06 The short answer is that to make it work properly, you'll probably need to setup a conditional rule for outputting the JSON-LD "name" field depending on if the variant.name is "Default Title" or not.

Long answer: 

It sounds like you are only using the {{ variant.title }} in the output for the JSON-LD "name" key.

I say this because Shopify products with no variants, technically have an virtual variant on the back, and the {{ variant.name }} for that variant is auto-set to "Default Title".

For example, lets say you have these three products, two of which have variants:

{{ product.title }}{{ variant.title }}
LED Bike Lampn/a
Boys 26in BicycleRed
Green
Blue
Unisex Mountain Bike

Front suspension
Rear suspension
Front + rear suspension

 

^ in the above example, technically the "LED Bike Lamp" product has no variants. However on the back of Shopify and accessible within Liquid there is 1x invisibile variant called "Default Title".

If you're going down the route of manually implementing JSON-LD it's worth a look at the example Shopify JSON-LD from Feedarmy it's a decent starting point to help understand how others are tackling this same problem (or literally just use it).

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
migreen06
Tourist
7 0 0

Thanks for your help!

I think I found the code that is responsible for this issue. Wouldn't it be much easier to just delete or change part of it? I have no idea what part to change though. I assume the part that says "name" : "product.title" or maybe "variant.title" but it seems correct. Here is a screen shot of that:Screenshot 2021-05-08 150952.png

0 Likes
KieranR
Shopify Partner
240 21 66

Yeah probably easier to change! There's going to be more than one way to fix this, and there are pretty loose rules around schema implementations. Here's a couple suggestions.

It looks like the code in that snip loops through all the variants and sets up itemOffered for each. 

  • try changing that so it handles the "default title" case differently
  • try changing the itemOffered "name" being output for each variant - usually something like combining product and variant titles would make more, assuming you're using a typical naming convention. Eg could combine with a space, dash, space separating the two fields. 
    • product.title & " - " & variant.title

A quick way to test is something like using ScreamingFrog on a listcrawl mode with say 5 live products. Then change, recrawl the short list and see how the output changes, refine a bit etc. There's some good documentation here for context as it relates to Google Search https://developers.google.com/search/docs/data-types/product#json-ld 

When you have it looking better, recrawl in GSC and see how it looks there. 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
migreen06
Tourist
7 0 0

I just don't understand why it would change the information. It's like it's pulling that info from somewhere else and overriding the information I supplied. I also noticed that it isn't just changing the name, the prices are all missing the second zero, like this 150.0 instead of 150.00. Google provided a line number for where it is getting that information but the line number is in three thousands and none of the code files go anywhere near that high. Where can I find that part of the code?

Why is it evaluating every product and variant twice? The products with variants are listed first with the warnings and no errors, with the correct names and then below that, it has each variant again but with the warnings (again) and the errors and referring to them as if the size is the name of the product. The products that don't have a variant, it lists the products and warnings and then below that it lists the product and its warnings (again) plus the errors and refers to the products by the name "default title."

0 Likes