【问题标题】:Adding Schema.org 'Brand' in JSON-LD在 JSON-LD 中添加 Schema.org“品牌”
【发布时间】:2019-06-24 06:36:49
【问题描述】:

我一直在向我的电子商务商店添加丰富的 sn-ps,并且在大多数情况下我没有遇到任何问题。出于某种原因,当我添加由 Google 和 Google Merchant 服务推荐的“品牌”时,我遇到了问题。

我已将其添加到:http://schema.org/Offer。并且通过在我的标题中的脚本中添加它也没有运气。

<script type="application/ld+json" data-resource-group="head_tag" data-resource-code="organization_schema">{
"@context": "http://schema.org",
"@type": "Organization",
"address": {
"@type": "PostalAddress",
"addressLocality": "",
"addressRegion": "",
"addressCountry": "",
"postalCode": "",
"streetAddress": ""
},
"email": "customerservice@domain.com",
"name": "Comany namee",
"telephone": "company number"
},
    "brand":{
        "@type":"Thing",
        "name":"[manufacture_name]"
    },
</script>
<meta itemprop="brand" content="[manufacturer_name]" />
"brand":{
    "@type":"Thing",
    "name":"[manufacture_name]"
},

第二个只是由于某种原因没有被检测到。

我在整个文档网中都有类似于元标记的代码,所以如果可能的话,我希望保持这种格式。

【问题讨论】:

  • 我在 schema.org 上搜索了您链接到的页面,但没有任何示例显示“品牌”出现在任何类似于您的示例的 JSON 中。此外,请务必将 JSON 包装在脚本标签中。当你说“问题”和“没有运气”时,你指的是什么?
  • 我在我试过的脚本中添加了“”将有公司信息

标签: schema.org json-ld google-rich-snippets


【解决方案1】:

您的 JSON-LD 存在语法错误:

  • Organization}, 关闭,但brand 属性出现在它之后。
  • 缺少关闭 }
  • 最后一个} 之后不应有,

原来是这样:

{
  "@context": "http://schema.org",
  "@type": "Organization",
  "address": {
    "@type": "PostalAddress"
  },
  "name": "company name",
  "brand": {
    "@type": "Brand",
    "name": "manufacturer name"
  }
}

(请注意,我使用了Brand 而不是Thing。)

【讨论】:

  • 所以在组织下添加了它,我试图在产品下添加它。
  • @Cooper:您的问题中的 sn-p 中没有 Product
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-09
  • 2019-01-04
  • 1970-01-01
  • 1970-01-01
  • 2016-03-18
  • 2018-11-13
相关资源
最近更新 更多