Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Seo 如何在谷歌搜索中指定产品ID“;应用程序/ld+;json";不带“的脚本”;缺少产品ID(可选)";_Seo_Schema.org_Json Ld_Structured Data_Google Search Console - Fatal编程技术网

Seo 如何在谷歌搜索中指定产品ID“;应用程序/ld+;json";不带“的脚本”;缺少产品ID(可选)";

Seo 如何在谷歌搜索中指定产品ID“;应用程序/ld+;json";不带“的脚本”;缺少产品ID(可选)";,seo,schema.org,json-ld,structured-data,google-search-console,Seo,Schema.org,Json Ld,Structured Data,Google Search Console,如何减少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", "im

如何减少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>
但错误仍然存在

有人能帮我解决Google搜索控制台上缺少产品ID(可选)的问题吗


在ld+json中设置产品id的正确行为是什么?

来自Google的消息不是很清楚……它正在寻找的是来自(gtin13等)的一个产品id。添加ProductID后,我收到了相同的错误,但一旦我用gtinxxx值替换ProductID,警告就消失了。

“ProductID”“是正确的格式。你在使用现场测试吗?任何编辑都需要时间才能编入索引并显示在索引结果中。您的意思是像“productID”:“9876543210”,我在上面的json代码中设置了它?是,在设置“productID”后,我已在现场测试中进行了测试。但没有得到任何更新,它仍然会收到一条警告消息。这应该会起作用。在实时测试中,您可以检查呈现的html。仔细检查您的结构化数据是否符合预期。好的,上面的@TonyMcCreath代码正确吗?你能确认一下吗?我觉得不错
1. "productID" : "9876543210",

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

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

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