如何使用 Schema.org for Google 标记重复事件?

问题描述 投票:0回答:5

我正在使用 schema.org 标记本地企业的页面,并且我有一个每周(周一至周四)重复发生的事件,我想发送元数据。

我浏览了互联网,似乎找不到任何关于如何正确标记它的答案。我按照 Google 用户组的建议使用

openingHours
,尽管我知道它不是
Event
模式的一部分。谷歌当然打电话给我了。

关于如何标记此内容有什么建议吗?

如果可行的话,我很高兴将其更改为其他类型,尽管我不确定可以将其更改为什么。作为参考,这是相关页面

更新 我又仔细研究了一下

Event
类型,发现了一个叫做
subEvent
的东西。 Schema.org 还表示,“重复事件可以被构造为单独的事件对象。”但我到底如何才能实现这一目标却超出了我的能力范围。 主要问题在于重复事件很大程度上是不确定的。这只是周一至周四,每周,无限期,因此尝试给出一堆实际日期(例如 7 月 10 日周四、7 月 15 日周二等)是没有意义的。

后续 如果 schema.org 没有解决方案,还有其他微数据格式可以吗?

schema.org google-rich-snippets structured-data
5个回答
4
投票

目前,只有为每个重复创建单独的

Event
项目的解决方案,如其定义中所述:

重复事件可以构造为单独的事件对象。

相关链接:

在提到的线程中,Martin Hepp 列出了为每个

单个事件创建单独的
Event项目的优点

  • 明确设置每个日期后,消费者更容易查询数据
  • 您可以对异常情况(取消、重新安排或延迟的事件)进行建模

2
投票

不幸的是,schema.org 还没有标记重复事件的机制,至少不容易。您基本上必须单独标记每个事件。但我注意到您的网站确实有一个娱乐日历,因此这将是标记餐厅所有活动的完美页面。作为建议,您应该使用 schema.org/Restaurant 作为主要实体/模式类型,然后在其中嵌套各种事件。这样,您就不必为每个独特的活动标记餐厅的名称和位置。


1
投票

更新:

您现在可以使用新的 EvenSchedule 类型来定义重复事件:)

参见 https://schema.org/eventSchedule


0
投票

我正在尝试为我的网站设置架构https://domainseotools.com我不知道如何去做。我需要帮助。


-1
投票

最好遵循当前的工作示例。它应该定义开始和结束时间段事件,但实际上未定义。首先,让我们看如下示例。

1. eventful.com event list page which has itemtype=

http://london.eventful.com/events

2. google result displays a structured data from that website.

https://www.google.co.jp/?gfe_rd=cr&ei=P6ARWaG0NrLK8geA0ozgCw&gws_rd=ssl#q=eventful.com+local&spf=1

这里是该事件“les Miserables”的 HTML。正如你所看到的,这段代码有一些结构化数据格式属性“itemtype”。

<div 
class="event card plu" 
itemtype="http://schema.org/Event" 
itemscope="" 
data-ga-action="Event Cards" 
data-href="http://london.eventful.com/events/les-miserables-/E0-001-036914463-9@2017050919" 
data-sid="E0-001-036914463-9@2017050919">
<img src="http://s3.evcdn.com/images/perspectivecrop373by249/I0-001/004/156/822-3.jpeg_/les-misrables-22.jpeg">
<a 
    class="card_link" 
    href="http://london.eventful.com/events/les-miserables-/E0-001-036914463-9@2017050919" 
    itemprop="url" 
    data-ga-label="PLU Card Link">
</a>
<div class="info">
    <h3 itemprop="name">
        <!-- check if item is PLU then add icon and link to learn -->
        <a title="" class="plu-link" href="http://eventful.com/advertise/learn" data-ga-label="Promote Events Link" data-original-title=""></a>
        <a href="http://london.eventful.com/events/les-miserables-/E0-001-036914463-9@2017050919" data-ga-label="Title Link">Les Miserables</a>
    </h3>
    <p class="details" itemprop="startDate" content="2017-05-09T19:30:00">Tue, May  9 -  7:30 PM</p>
    <p itemprop="location" itemtype="http://schema.org/Place" itemscope="">
        <a class="details venue" href="http://london.eventful.com/venues/queens-theatre-/V0-001-001363468-4" itemprop="url">
            <span itemprop="name">Queen's Theatre</span>
        </a>
    </p>
    <p>
    </p>
</div>
<a class="bn bn-sz-sm modernize bn-orange click-tckt-link" href="http://london.eventful.com/events/les-miserables-/E0-001-036914463-9@2017050919/tickets" target="_blank" rel="nofollow" data-ga-label="PLU Ticket Button" source="fet" data-lid="fet" data-spot="homepage_card">Find Tickets</a>

root itemtype 是 itemtype="http://schema.org/Event" 作为 div 的属性。

活动名称来自 您可以找到开始日期“5 月 9 日星期二 - 晚上 7:30

”。

为了效仿这样的例子,结构化数据应该有效。

旧答案:

您可以找到使用 google richsnippet 列出事件的示例网站。

塔科马圆顶日历 support.google.com/webmasters/answer/164506?hl=zh-CN

让我们看看网站“eventful.com”在谷歌结构化数据测试工具中的样子。 www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fseattle.eventful.com%2Fvenues%2Ftacoma-dome-%2FV0-001-000144232-7

活动属于“活动场地”类型。 我尝试了相同的结构并成功了。

© www.soinside.com 2019 - 2024. All rights reserved.