在HTML网站中实现结构化架构



我正在为我的网站实现结构化数据(schema.org(。

我一直在输入ratingValuereviewCount,以及我能够动态输入的所有其他内容。

"review": [
{
"@type": "Review",
"reviewRating":{
"@type": "Rating",
"ratingValue": "4",
"bestRating": "5"
},
"author":{
"@type": "Organization",
"name": "xyz"
}
}
],
"aggregateRating": 
{
"@type": "AggregateRating",
"ratingValue": "3.7",
"reviewCount": "15"
}

我可以把reviewCountratingValue放在哪里?我们没有要求我们的客户提供任何评论/评级

我认为在您的情况下,使用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,但不是必需的。

如果出于某种原因,您必须在该项目中使用AggregateRating,那么您可以将reviewCount硬编码为1,并将ratingValue设置为您已经提取到reviewRating中的值。然而,这再次违背了AggregateRating的目的。

最新更新