我在运行结构化数据测试工具时遇到错误。对于问题没有找到解决方案或解释。谷歌用瑞典语显示错误,不允许我用谷歌搜索这个问题,谷歌也没有提供任何链接来解释问题所在。我正在尝试向网站添加结构化数据,并包括优惠和评级。当我尝试通过测试工具运行该代码片段时,谷歌表示它无法标准化价格值。我不知道这意味着什么,也没有找到任何信息。
这就是我的脚本的样子:
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"image": "https://www.test.com/bild.png",
"name": "Produktnamn",
"description": "Beskrivning.",
"brand": {
"@type": "Product",
"name": "Företag"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "15",
"reviewCount": "3",
"worstRating": "1",
"bestRating": "5"
},
"offers": {
"@type": "Offer",
"priceCurrency": "sek",
"price": "519",
"priceValidUntil": "2019-01-01",
"itemCondition": "http://schema.org/NewCondition",
"availability": "http://schema.org/InStock",
"url": "https://www.test.com/produktsida"
} }
</script>
最佳答案
您使用的 ratingValue 为 15,这超出了您为 worstRating 和 bestRating 定义的范围。
您的值应该更正为介于 1 和 5 之间,或者您的范围有误。
关于javascript - 结构化数据测试工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53931004/