如何使用 JSON-LD 代码为多产品页面启用丰富网页摘要?
How to enable rich snippets using JSON-LD code for multi product pages?
我想让产品页面的丰富网页摘要出现在 google SERPS 中。这是一个页面:
- 包含多个产品,每个产品都有单独的价格
- 具有平均总评分
据我了解,可以使用多个商品将多个产品添加到架构组织中的一个页面。问题是我找不到有关如何使用 JSON-LD 执行此操作的文档。我在下面的代码中自己尝试过,但不知道这是否正确。我可以只添加这样的优惠还是需要以不同的方式添加?
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "[rating variable]",
"reviewCount": "[count variable]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
}
</script>
只需创建一个报价数组。
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "[name]",
"image": "[logo]",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "[rating],
"reviewCount": "[votes]"
},
"offers": [{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"@type": "thing",
"name": "[name product]"
}
},{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"@type": "thing",
"name": "[name product]"
}
},{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"Category": {
"@type": "thing",
"name": "[name product]"
}
}]
}
</script>
我想让产品页面的丰富网页摘要出现在 google SERPS 中。这是一个页面:
- 包含多个产品,每个产品都有单独的价格
- 具有平均总评分
据我了解,可以使用多个商品将多个产品添加到架构组织中的一个页面。问题是我找不到有关如何使用 JSON-LD 执行此操作的文档。我在下面的代码中自己尝试过,但不知道这是否正确。我可以只添加这样的优惠还是需要以不同的方式添加?
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "[rating variable]",
"reviewCount": "[count variable]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"@type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
}
</script>
只需创建一个报价数组。
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "[name]",
"image": "[logo]",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "[rating],
"reviewCount": "[votes]"
},
"offers": [{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"@type": "thing",
"name": "[name product]"
}
},{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"@type": "thing",
"name": "[name product]"
}
},{
"@type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"Category": {
"@type": "thing",
"name": "[name product]"
}
}]
}
</script>