I hag a previous JSON-LD tag on my products page, which worked well (no errors, and 3 warnings in Google's Structured Data Testing Tool).
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "My product name",
"description": "My product description",
"image": [
"https://link.to/my/image_1.jpg",
"https://link.to/my/image_2.jpg",
"https://link.to/my/image_3.jpg"
],
"sku": "00000100000",
"brand": {
"@type": "Thing",
"name": "BRANDNAME"
},
"offers": {
"@type": "Offer",
"url": "https://link.to/my/product/id",
"priceCurrency": "EUR",
"price": "249.90",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock"
},
"reviews": [
{
"@type": "Review",
"datePublished": "2019/03/19",
"name": "Very nice product",
"reviewBody": "Very nice product \r\nI mean it",
"reviewRating": {
"@type": "Rating",
"ratingValue": 5,
"bestRating": 5,
"worstRating": 1
},
"author": {
"@type": "Person",
"name": "ClientPseudo"
}
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "5",
"reviewCount": 1,
"bestRating": 5,
"worstRating": 1
}
}
</script>
I tried to add breadcrumb
by moving my Product
content into the mainEntity
of an ItemPage
type as suggested here, but the tool does not display any warning anymore.
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "ItemPage",
"mainEntity": {
"@type": "Product",
"name": "My product name",
"description": "My product description",
"image": [
"https://link.to/my/image_1.jpg",
"https://link.to/my/image_2.jpg",
"https://link.to/my/image_3.jpg"
],
"sku": "00000100000",
"brand": {
"@type": "Thing",
"name": "BRANDNAME"
},
"offers": {
"@type": "Offer",
"url": "https://link.to/my/product/id",
"priceCurrency": "EUR",
"price": "249.90",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock"
},
"reviews": [
{
"@type": "Review",
"datePublished": "2019/03/19",
"name": "Very nice product",
"reviewBody": "Very nice product \r\nI mean it",
"reviewRating": {
"@type": "Rating",
"ratingValue": 5,
"bestRating": 5,
"worstRating": 1
},
"author": {
"@type": "Person",
"name": "ClientPseudo"
}
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "5",
"reviewCount": 1,
"bestRating": 5,
"worstRating": 1
}
},
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "/",
"name": "Home"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "/myCategory",
"name": "My Category"
}
},
{
"@type": "ListItem",
"position": 3,
"item": {
"@id": "/mySubCategory",
"name": "My subcategory"
}
}
]
}
}
</script>
How can I make sure my code is valid?