【问题标题】:Google Product Schema errorsGoogle 产品架构错误
【发布时间】:2021-04-02 16:14:12
【问题描述】:

我在页面中添加了这样的架构,但是当我测试它时 谷歌的测试工具-https://search.google.com/structured-data/testing-tool/u/0/ 它显示“@type
未指定类型
"

<script type="application/ld+json">
{
  "@type": "Product",
  "@context": "http://schema.org/",
  "name": "My Product Name",
  "description": "My Description",
  "brand": { "@type": "Thing", "name": "My Brand Name" },
  "image": "https://yoursite.com/path-to-image.jpg",
  "sku": "product-sku-12345"
}
</script>

任何想法如何解决这个问题?

谢谢

【问题讨论】:

  • 如果您使用Google's new validation tool,您会看到有关“offer”、“review”或“aggregateRating”缺失的投诉。
  • 没错,我该如何解决?
  • 在您的 JSON 中添加类似 "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4", "reviewCount": "250" } 的内容。请参阅此处的定义:schema.org/AggregateRating
  • 谢谢,但我网站上的产品没有评分。我该怎么办?
  • 这都是关于富搜索结果的。如果您没有任何东西可以显示为富搜索结果,那么您就不会拥有那些花哨的富搜索结果(这也没有问题)。查看Product rich search results的指南

标签: javascript jquery schema


【解决方案1】:

您没有正确使用产品架构结构化数据(缺少报价)。详情请查看https://developers.google.com/search/docs/data-types/product。所以你最小的 ld+json 脚本应该是这样的

<script type="application/ld+json">
{
 "@type": "Product",
  @context": "http://schema.org/",
  "name": "My Product Name",
  "description": "My Description",
  "brand": { "@type": "Thing", "name": "My Brand Name" },
  "image": "https://yoursite.com/path-to-image.jpg",
  "sku": "product-sku-12345",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/anvil",
    "priceCurrency": "USD",
    "price": "119.99",
    "priceValidUntil": "2020-11-20",
    "itemCondition": "https://schema.org/UsedCondition",
    "availability": "https://schema.org/InStock"
  }
}
</script>

【讨论】:

  • 谢谢,但我网站上的产品没有评分。我该怎么办?
  • 评级是可选的。如果您没有在您的网站上实施评级系统 - 您可以随意使用没有“评论”部分的产品标记。此架构中的“优惠”部分是强制性的
猜你喜欢
  • 2019-12-19
  • 1970-01-01
  • 2010-11-15
  • 1970-01-01
  • 1970-01-01
  • 2018-08-10
  • 2017-01-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多