SDTT 错误:"A value for the position field is required."



我在 Google 结构化数据测试工具中收到一条错误消息,表明我缺少结构化数据position值:

position字段的值是必需的。

我似乎不知道它应该驻留在哪里。 我尝试在几个地方添加position值。

{
    "@context": "http://schema.org",
    "@type": "ItemList",
    "numberOfItems": "5",
    "url": "https://www.mygiftcardsplus.com/buy/merchant/id/Nik#GiftCardItemList ~~~ named location on the page",
    "itemListElement": [
        {
            "@type": "Product",
            "image": "https://d3bvejazygcenf.cloudfront.net/images/merchant/14597-90617-b16b-5a17/300x190.png",
            "url": "https://www.mygiftcardsplus.com/buy/merchant/id/Nik#25GiftCard ~~~ named location on the page",
            "name": "$25 Nike Gift Card",
            "description": "Get 5% cash back on a $25 Nike Gift Card",
            "offers": {
                "@type": "Offer",
                "price": "25",
                "priceCurrency": "USD"
            }
        },
        {
            "@type": "Product",
            "image": "https://d3bvejazygcenf.cloudfront.net/images/merchant/14597-90617-b16b-5a17/300x190.png",
            "url": "https://www.mygiftcardsplus.com/buy/merchant/id/Nik#50GiftCard ~~~ named location on the page",
            "name": "$50 Nike Gift Card",
            "description": "Get 5% cash back on a $50 Nike Gift Card",
            "offers": {
                "@type": "Offer",
                "price": "50",
                "priceCurrency": "USD"
            }
        },
                {
            "@type": "Product",
            "image": "https://d3bvejazygcenf.cloudfront.net/images/merchant/14597-90617-b16b-5a17/300x190.png",
            "url": "https://www.mygiftcardsplus.com/buy/merchant/id/Nik#150GiftCard ~~~ named location on the page",
            "name": "$150 Nike Gift Card",
            "description": "Get 5% cash back on a $150 Nike Gift Card",
            "offers": {
                "@type": "Offer",
                "price": "150",
                "priceCurrency": "USD"
            }
        }
    ]
}

可以将position添加到CreativeWorkListItem项目。

如果要给出产品在列表中的位置,可以使用ListItem类型并通过item指定Product

"itemListElement": [
  {
    "@type": "ListItem",
    "position": 1,
    "item": {
      "@type": "Product"
    }
  },
  {
    "@type": "ListItem",
    "position": 2,
    "item": {
      "@type": "Product"
    }
  }
]

最新更新