如何在google搜索控制台的“application/ld+json”脚本中减少“缺少产品id(可选)”的警告?
下面是我的示例json-ld代码

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "done product Name here",
  "url": "done product url here",
  "image": [
      "done image url here"
    ],
  "description": "done description here",
  "sku": "H100000001",
  "productID" : "9876543210",  // Added like this type behaviour
  "brand": {
    "@type": "Thing",
    "name": "cosmetics"
  },
  "offers": [{
        "@type" : "Offer",
        "sku": "H100000002",
        "availability" : "http://schema.org/InStock",
        "price" : "26.0",
        "priceCurrency" : "USD",
        "url" : "product url"
      },
      {
        "@type" : "Offer",
        "sku": "H100000003",
        "availability" : "http://schema.org/InStock",
        "price" : "26.0",
        "priceCurrency" : "USD",
        "url" : "product url"
      },
      {
        "@type" : "Offer",
        "sku": "H099020004",
        "availability" : "http://schema.org/InStock",
        "price" : "26.0",
        "priceCurrency" : "USD",
        "url" : "product url"
      }]
}
</script>

我在下面尝试了不同的产品id变量
1. "productID" : "9876543210",

2. "productID" : "isbn:9876543210",

3. "product-id" : "isbn:9876543210",

4. "product-id" : "9876543210",

但错误仍然存在。
seo - 如何在Google搜索“application/ld &#43; json”脚本中指定产品ID,而不会显示“缺少产品ID(可选)”-LMLPHP
有谁能帮我解决谷歌搜索控制台上丢失产品ID(可选)“的问题吗?
在ld+json中设置产品id的正确行为是什么?

最佳答案

来自谷歌的信息不是很清楚…它要找的是https://schema.org/Product(gtin13等)中的一个产品id。在添加productid之后,我得到了同样的错误,但是当我用gtinxxx值替换productid之后,警告就消失了。

07-24 09:55