简体   繁体   中英

Gmail Markup for Multiple Events

I'm developing event markup using json-ld to be included with confirmation emails.

Some of my events are recurring at regular intervals. However, recurring events are not supported by the latest Schema.org specifications so I've followed the advice offered here: http://lists.w3.org/Archives/Public/public-vocabs/2011Dec/0062.html and decided to embed a json list of the individual events.

The json-ld passes the tests in the Email Markup Tester provided by google ( https://www.google.com/webmasters/markup-tester/u/0/ ).

However, when I test the google calendar integration by sending the email to myself, only 1 out of 6 events in the series appears in my calendar (oddly, it's neither the first or last event in the list).

Does gmail markup support multiple events in the same email? If so is there a better way to do it?

Example Markup:

<script type="application/ld+json">
[
  {
    "reservationNumber": "7e15afb6b2485005e55481be58de4141b70f85006bd25823", 
    "reservationFor": {
      "startDate": "2015-05-09T16:00:00-07:00", 
      "endDate": "2015-05-09T22:30:00-07:00", 
      "description": "regularly schedule XXXX", 
      "location": {
        "address": {
          "addressCountry": "US", 
          "addressLocality": "XXX", 
          "addressRegion": "XXX", 
          "streetAddress": "XXX", 
          "postalCode": "XXX", 
          "@type": "PostalAddress"
        }, 
        "@type": "Place", 
        "name": "XXX"
      }, 
      "@type": "Event", 
      "name": "XXX Every 2 Weeks"
    }, 
    "modifyReservationUrl": "https://example.com/XXX", 
    "reservationStatus": "http://schema.org/Confirmed", 
    "underName": {
      "@type": "Person", 
      "name": "XXX"
    }, 
    "@context": "http://schema.org", 
    "@type": "EventReservation"
  }, 

  ...

  {
    "reservationNumber": "40553edbce52f0052e153919a4dad49ec32516c15433bf4a", 
    "reservationFor": {
      "startDate": "2015-05-23T16:00:00-07:00", 
      "endDate": "2015-05-23T22:30:00-07:00", 
      "description": "regularly schedule XXX", 
      "location": {
        "address": {
          "addressCountry": "US", 
          "addressLocality": "XXX", 
          "addressRegion": "XXX", 
          "streetAddress": "XXX", 
          "postalCode": "XXX", 
          "@type": "PostalAddress"
        }, 
        "@type": "Place", 
        "name": "XXX"
      }, 
      "@type": "Event", 
      "name": "XXX Every 2 Weeks"
    }, 
    "modifyReservationUrl": "https://example.com/XXX", 
    "reservationStatus": "http://schema.org/Confirmed", 
    "underName": {
      "@type": "Person", 
      "name": "XXX"
    }, 
    "@context": "http://schema.org", 
    "@type": "EventReservation"
  }, 
]
</script>

您可以尝试使用此处文档中提到的Quick Apps脚本教程在html文件中添加此标记。

Does making a list help: https://schema.org/ItemList

Haven't tested this out, but it might be a useful approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM