I'm not sure if I can use together in the same page the CollectionPage and Product schema types. Is this correct for a category page?
My needs for the page are:
- to identify as a CollectionPage the current category page (because it actually is one)
- to identify breadcrumbs for the current category page
- to identify aggregate ratings for the current category page
- to identify 2 single reviews for the current category page
Since the needs clarified up here, I've checked the documentation on schema.org, specifically these pages: CollectionPage, BreadcrumbList, AggregateRating. Then, I tried to implement what I need.
My current implementation:
{
"@context":"https://schema.org",
"@graph":[
{
"@type":"Organization",
"@id":"https://www.somewebsite.com/#organization",
"name":"Fotoregali",
"url":"https://www.somewebsite.com/",
"sameAs":[
"https://www.facebook.com/somecoolwebsite",
"https://www.instagram.com/somecoolwebsite/",
"https://www.youtube.com/user/somecoolwebsite",
"https://it.pinterest.com/somecoolwebsite/",
"https://twitter.com/somecoolwebsite"
],
"logo":{
"@type":"ImageObject",
"@id":"https://www.somewebsite.com/#logo",
"url":"https://www.somewebsite.com/logo-or.png",
"width":345,
"height":84,
"caption":"Fotoregali"
},
"image":{
"@id":"https://www.somewebsite.com/#logo"
}
},
{
"@type":"WebSite",
"@id":"https://www.somewebsite.com/#website",
"url":"https://www.somewebsite.com/",
"name":"Fotoregali",
"publisher":{
"@id":"https://www.somewebsite.com/#organization"
},
"potentialAction":{
"@type":"SearchAction",
"target":"https://www.somewebsite.com/ricerca/?q={search_term_string}",
"query-input":"required name=search_term_string"
}
},
{
"@type":[
"CollectionPage"
],
"@id":"https://www.somewebsite.com/category/#webpage",
"url":"https://www.somewebsite.com/category/",
"inLanguage":"it-IT",
"name":"category personalizzate su più supporti",
"isPartOf":{
"@id":"https://www.somewebsite.com/#website"
},
"datePublished":"2018-11-21T14:46:12+00:00",
"dateModified":"2019-12-03T15:20:32+00:00",
"description":"Hey this is a category description!",
"breadcrumb":{
"@id":"https://www.somewebsite.com/category/#breadcrumb"
}
},
{
"@type":"Product",
"aggregateRating":{
"@type":"AggregateRating",
"ratingValue":"4.8",
"reviewCount":"7441"
},
"description":"Hey this is a category description!",
"name":"Category name",
"image":"url-img-product.jpg",
"offers":{
"@type":"Offer",
"availability":"http://schema.org/InStock",
"price":"100.00",
"priceCurrency":"EUR"
},
"review":[
{
"@type":"Review",
"author":"Username",
"datePublished":"2011-04-01",
"description":"Review text here.",
"name":"Review title",
"reviewRating":{
"@type":"Rating",
"bestRating":"5",
"ratingValue":"1",
"worstRating":"1"
}
},
{
"@type":"Review",
"author":"Username",
"datePublished":"2011-03-25",
"description":"Review text here.",
"name":"Review title",
"reviewRating":{
"@type":"Rating",
"bestRating":"5",
"ratingValue":"4",
"worstRating":"1"
}
}
]
},
{
"@type":"BreadcrumbList",
"@id":"https://www.somewebsite.com/category/#breadcrumb",
"itemListElement":[
{
"@type":"ListItem",
"position":1,
"item":{
"@type":"WebPage",
"@id":"https://www.somewebsite.com/",
"url":"https://www.somewebsite.com/",
"name":"Home"
}
},
{
"@type":"ListItem",
"position":2,
"item":{
"@type":"WebPage",
"@id":"https://www.somewebsite.com/category/",
"url":"https://www.somewebsite.com/category/",
"name":"Category name"
}
}
]
}
]
}
Structured Data Testing Tool results
Google's Structured Data Testing Tool (and also this other tool from Google) seems OK with my implementation (only warnings), but my doubt lies in the fact that the page with the json/ld
I've built is identified at the same time as CollectionPage
and Product
.
Is this correct for a category page?
CollectionPage
) AND also the single products in it (if necessary). Any suggestions?