我正在为我的网站实施结构化数据(schema.org)。
我被困于ratingValue
和reviewCount
的投入,我能够动态投入的其他一切。
"review": [
{
"@type": "Review",
"reviewRating":{
"@type": "Rating",
"ratingValue": "4",
"bestRating": "5"
},
"author":{
"@type": "Organization",
"name": "xyz"
}
}
],
"aggregateRating":
{
"@type": "AggregateRating",
"ratingValue": "3.7",
"reviewCount": "15"
}
我可以在哪里放置reviewCount
和ratingValue
?我们不要求客户提供任何评论/评分
[我认为在您的情况下,使用AggregateRating
没有任何意义,因为(假定的)网站作者只发表了一篇评论。 “集合”基本上是指“集合的摘要”,因此要使用AggregateRating
,您要说有或可能有多个评论-不仅仅是一个评论。
假设这是Product
,我将改用此标记:
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "Some Product",
"description": "This is some product",
"review": {
"@type": "Review",
"author": {
"@type": "Organization",
"name": "xyz"
},
"reviewRating": {
"@type": "Rating",
"bestRating": "5",
"ratingValue": "4",
"worstRating": "1"
}
}
}
推荐使用[AggregateRating
中的[Structured Data Testing Tool,但不是必需的。 如果由于某种原因必须在该项目中使用AggregateRating
,则可以将reviewCount
硬编码为1
,然后将ratingValue
设置为已经放入reviewRating
的值。同样,这违反了AggregateRating
的目的。