You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Render product structured data (JSON-LD) from the theme #87
Spark product pages use the platform's {% seo %} tag for their structured product data (schema.org JSON-LD). That markup has problems that cost merchants rich results in Google and give AI shopping tools wrong or missing product data:
It is invalid JSON whenever the description has a line break or the title or description contains a double quote or backslash. Google then ignores the whole block.
brand is always the store name.
The UPC is emitted as mpn, and there is no gtin.
A product with variants is one Product with one price, so variant prices, availability and identifiers are missing.
The JSON-LD description is cut at 160 characters.
Spark can fix this itself by overriding the product page's seo block with its own partial, without waiting on a platform change.
Done when
Product pages render their meta, Open Graph and JSON-LD from a Spark partial.
A product with variants is a ProductGroup with one Product and Offer per variant.
Brand, GTIN and MPN can come from product metadata; the UPC is used as the GTIN only when it is a valid GTIN length.
Every string is JSON-escaped, so quotes and line breaks in product text produce valid JSON.
Google's Rich Results Test reports no critical issues for a product with variants on a real store.
Activity