我已针对我所使用的网站的事件列表实施了Google Feed模式,并使用google.com/structured-data/testing-tool对其进行了测试。没有错误。
我正在尝试通过Google搜索获取活动,并将showtimes直接点击到网站的活动页面。有些是电影放映,有些是表演。到目前为止,谷歌已将标题,日期和放映时间编入索引,但这些都无法点击到活动页面。
以下是json Feed的片段:
<script type='application/ld+json'>
[
{
"@context": "http://schema.org",
"@type": "Event",
"name": "Lady Bird",
"startDate" : "2017-12-18T16:30:00",
"location" : {"@type" : "Place","name": "BAM Rose Cinemas","address" : {"@type" : "PostalAddress","addressLocality" : "Brooklyn","addressRegion": "NY"}},"offers" : {"@type" : "Offer","url": "https://cinematickets.bam.org/#tickets/24419/6866/d39d8941-529f-4864-a871-a3a900d2b1d6","availability": "http://schema.org/InStock"}},{"@context": "http://schema.org","@type": "Event","name": "Lady Bird","startDate" : "2017-12-18T19:00:00","location" : {"@type" : "Place","name": "BAM Rose Cinemas","address" : {"@type" : "PostalAddress","addressLocality" : "Brooklyn","addressRegion": "NY"}},"offers" : {"@type" : "Offer","url": "https://cinematickets.bam.org/#tickets/24417/6866/d39d8941-529f-4864-a871-a3a900d2b1d6","availability": "http://schema.org/InStock"}
}
]
</script>
此Feed中有2个放映时间。首先,我尝试将URL作为事件顶级节点的属性,然后将URL作为属性置于商品下。几乎相同的结果。
我做错了什么?如何将放映时间直接点击到网站的活动页面?
答案 0 :(得分:1)
问题可能是Offer
没有标识name
的{{1}}。试一试:
url
另一种更容易维护的方法是为每个[{
"@context": "http://schema.org",
"@type": "Event",
"name": "Lady Bird",
"startDate": "2017-12-18T16:30:00",
"location": {
"@type": "Place",
"name": "BAM Rose Cinemas",
"address": {
"@type": "PostalAddress",
"addressLocality": "Brooklyn",
"addressRegion": "NY"
}
},
"offers": {
"@type": "Offer",
"name": "Our price for early birds to see Lady Bird",
"url": "https://cinematickets.bam.org/#tickets/24419/6866/d39d8941-529f-4864-a871-a3a900d2b1d6",
"availability": "http://schema.org/InStock"
}
},
{
"@context": "http://schema.org",
"@type": "Event",
"name": "Lady Bird",
"startDate": "2017-12-18T19:00:00",
"location": {
"@type": "Place",
"name": "BAM Rose Cinemas",
"address": {
"@type": "PostalAddress",
"addressLocality": "Brooklyn",
"addressRegion": "NY"
}
},
"offers": {
"@type": "Offer",
"name": "Our first evening show to see Lady Bird"
"url": "https://cinematickets.bam.org/#tickets/24417/6866/d39d8941-529f-4864-a871-a3a900d2b1d6",
"availability": "http://schema.org/InStock"
}
}]
创建一个唯一的<script>
,然后使用@Type
进行链接。然后,您可以为每个@ID
添加description
,以便为收割者提供更多信息以便重新投放。当然,您也可以将item
添加到当前设计中。底线:为description
的每个实例提供更多属性,以指导收割者。