如何为 Google 标记 Schema.org 的在线活动?

How to mark up an online event with Schema.org for Google?

我已经按要求使用了 Event schema for describing an online event, but Google asks for location 属性。

您会使用哪种架构? 如果您使用 Event 架构,您将如何设置 location 属性?

<script type='application/ld+json'>
{
    "@context": "http://www.schema.org",
    "@type": "Event",
    "name": "This is the event name",
    "url": "http://example.com",
    "performer" : {
        "@type": "Person",
        "name" : "Daniel G.",
        "additionalName" : "Dani",
        "description": "This is my description"
    },
    "description": "This is the description of the event",
    "startDate": "2017-06-03T14:38:00+02:00",
    "endDate": "2017-06-03T15:08:00+02:00",
    "duration": "PT30M",
    "inLanguage": "es",
    "image" : "http://example.com/image.jpg",
    "offers": {
        "@type": "Offer",
        "price": 10,
        "availability" : "http://schema.org/InStock",
        "priceCurrency": "EUR",
        "url": "http://example.com"
    }
}
</script>

Event 也可能是在线活动的正确类型(并且没有其他更合适的类型可用)。

Google、according to their documentation,仅支持实体活动的富媒体搜索结果。

因此,您无法为在线活动获得 Google 富媒体搜索结果。您当然可以保留标记(并省略 location 属性)。


¹ 请参阅问题 applicability of Event to online events e.g. consider Webinar subtype

现在可以使用其他标记来描述 online/offline 事件。对于 Event check out the new eventAttendanceMode 属性,它至少接受来自以下选项(枚举)的值:OfflineEventAttendanceMode、OnlineEventAttendanceMode、MixedEventAttendanceMode。

根据 this example,您可以将位置用作 URL。