-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dawn 15 Update rendering incorrect product data in JsonLD schema. #3535
Comments
My availability is not rendering correctly. It's showing InStock for OutofStock Variants. Can someone point me to where this code resides? I've commented it out on main-product and featured-product, but the product snippets are still coming through when I test it. Thanks! |
@mbasden do you have an example we can take a look at for the InStock / OutOfStock variants issue? |
@kittol Thanks for reaching out. In Dawn V15 we updated product structured data to be generated with the new structured_data filter, whereas prior to V15 all clients needed to manually construct this in their .liquid files. The structured_data filter is intended to be evergreen based on Google's latest SEO recommendations and the Schema.org type definitions, and enables themes to get structured data updates automatically rather than requiring a theme update when the schema changes. This is completely optional for themes; there is no requirement for themes on the theme store to migrate their code to use this filter. However, we will be using this pattern in all Shopify-owned themes. If you are on a Shopify-owned theme and don't want to use the new structured data filter, you can absolutely replace the filter in your .liquid with any content you like. Here's an example of how we used to generate this data in the main-product.liquid template. To answer your specific questions:
This field is currently returning the product's ID (schema.org definition). After consulting with our internal SEO team, this probably doesn't make sense to surface so we will be removing this field soon. Worth noting that this field does not impact the google crawler being able to find the product's SKU.
I've chatted with our internal SEO team, and the field order within the structured data should not have any impact on crawlers or cause any conflicts.
The @id field enables you to extend the structured data output by the filter, see this guide on adding multiple structured data items. It has no impact on the crawler aside than this.
We currently pull category from product type field on the admin product details page, but will evolve this in the near term to pull from the new Category taxonomy field if the merchant has set a value, and then fall back to product type if not. |
@lhoffbeck it seems that "aggregateRating": { Is not generated, when the standard shopify review fields are set. Can that be fixed? Before we just had something like this: <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "Product", "name": {{ product.title | json }}, "url": {{ request.origin | append: product.url | json }}, {% if seo_media -%} "image": [ {{ seo_media | image_url: width: 1920 | prepend: "https:" | json }} ], {%- endif %} "description": {{ product.description | strip_html | json }}, {% if product.selected_or_first_available_variant.sku != blank -%} "sku": {{ product.selected_or_first_available_variant.sku | json }}, {%- endif %} "brand": { "@type": "Brand", "name": "Famme" }, "offers": [ {%- for variant in product.variants -%} { "@type" : "Offer", {%- if variant.sku != blank -%} "sku": {{ variant.sku | json }}, {%- endif -%} {%- if variant.barcode.size == 12 -%} "gtin12": {{ variant.barcode }}, {%- endif -%} {%- if variant.barcode.size == 13 -%} "gtin13": {{ variant.barcode }}, {%- endif -%} {%- if variant.barcode.size == 14 -%} "gtin14": {{ variant.barcode }}, {%- endif -%} "availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}", "price" : {{ variant.price | divided_by: 100.00 | json }}, "priceCurrency" : {{ cart.currency.iso_code | json }}, "url" : {{ request.origin | append: variant.url | json }} }{% unless forloop.last %},{% endunless %} {%- endfor -%} ],"aggregateRating": { "@type": "AggregateRating", "description": "Famme Reviews", "ratingValue": "{{ star_product_rating }}", "ratingCount": "{{ product_review_count }}" } } </script> |
Hey @gregjotau , sorry I missed your message. We are only returning fields in the structured data that come from concrete data, not sourced from metafields. You can pretty easily extend the structured data by adding a block with your review snippet, following this pattern: https://search.google.com/test/rich-results/result/r%2Fproduct?id=jRoMeArx1A7xF2Ajq-fhdQ. If you expand the product snippet on the test results page you'll see that it incorporates the review as part of the overall product structured data. |
Product Schema via JsonLD is being altered in Dawn 15 Update resulting in incorrect values for critical fields such as 'Product ID'.
Discovered during testing in Google Search Console
Possible Solution - allow merchants to correctly populate fields from accessible merchant metadata
Additional context/screenshots
The 'Product ID' field in the screenshot now contains a number that seems to be irrelevant to my product data.
This field is the first entry in the Schema for the Product ID.
The SKU that is used to populate data in Merchant centre is much further down the data and this will cause conflicts for Google Bot crawling product data.
I am unable to find a field to correct this 'Product ID' on my merchant visible product page.
There is an additional ID field populated with url of the page and then '#product' why? This seems irrelevant and results in there now being two superfluous 'ID' type fields in the code before the crawler will find the actual product id of the SKU?
In Dawn 14 the Product Schema for the product data renders correctly.
Metafields on the product page have been changed so the google category in schema is now giving incorrect values and utilising the
Schema now renders as follows:
Id: (merchant url)#product
type: Product
product ID: 13 digit number (from unknown source? Has this been populated automatically by AI to resemble my product SKU's?)
name: (Page Title)
description: ( correct)
category: (this now seems to be pulled from the 'product type' metafield on the store page that is supposed to be where a merchant can populate additional data about their product type rather than this being the main google category/product type)
brand: (correct)
offer: (correct)
sku: (correct)
availability: (correct)
price: (correct)
url: (correct
Etc. Obviously this varies depending upon product/merchant data, but the rest of the schema seems to render ok for me.
Everything else with the update to the new version of Dawn 15 seemed improved for me but until clarity and correction is gained upon these critical issues with Schema I will not be able to update.
The text was updated successfully, but these errors were encountered: