eventAttendanceMode: New Structured data Properties For Events
Many of us use Google search to check events we want to attend nowadays.
In order to update how our events show in Google search results, we can use Structured data / schema.org markup
Structured data property called eventAttendanceMode is a new property to the Event structured data type that enables event organizers to communicate how people can attend their event.
Structured data for Events
Today, Google announces on the official Google Webmaster Central Blog that they added new properties for canceled events.
So, to update your customers on events status please make sure you implement new Structured data properties for canceled events.
eventStatus property explained
An eventStatus property of an event represents its status; particularly useful when an event is cancelled or rescheduled.
Here are common event statuses and values for your structured data definition:
Status of the event | Property |
---|---|
If the event has been canceled | Set the eventStatus property to EventCancelled and keep the original date in the startDate of the event. |
If the event has been postponed (but the date isn’t known yet) | Keep the original date in the startDate of the event until you know when the event will take place and update the eventStatus to EventPostponed. The startDate property is required to help identify the unique event, and we need the date original startDate until you know the new date. Once you know the new date information, change the eventStatus to EventRescheduled and update the startDate and endDate with the new date information. |
If the event has been rescheduled to a later date | Update the startDate and endDate with the relevant new dates. Optionally, you can also mark the eventStatus field as EventRescheduled and add the previousStartDate. |
If the event has moved from in-person to online-only | Optionally update the eventStatus field to indicate the change with EventMovedOnline. |
More about eventStatus property you can find in the developer documentation.
“eventattendancemode” code examples
Here are examples of structured data codes you can use and adjust for your use case.
Normally scheduled event
Canceled event
Event postponed
Rescheduled event
Event moved online
Virtual (Online) Event schema.org markup – JSON-LD
Markup your online event with structured data. Using the schema.org standard you can markup your event using microdata or json-ld syntax.
Here is an example of a Virtual (Online) Event:
You can see all code examples from this blog on my github gist profile.
Fix missing field “eventattendancemode” in The Events Calendar WordPress plugin
The Events Calendar WordPress plugin is a very popular plugin for WordPress CMS. There is still no official support for moving all events online only. Here is a simple snippet by @pbosakov that needs to be placed in function.php file in order to move all your events online due to COVID-19. You can use this snippet as a starting point for other changes I showed in my snippets above.
Official Extension
According to Gustavo Bordoni, the backend developer on The Events Calendar WP plugin, we can achieve full support of new Google properties for Canceled, Postponed, and Online events by using the extension.
Extension for Events Calendar WP plugin for Canceled, Postponed, and Online events.
The Events Advanced Control is only available when the „new design“ is activated! (has nothing to do with Gutenberg, etc.)
Online events
If your events are online only or moved online Google is working on a way to show this information to people on Google Search too.
For online-only events please use the following properties:
- Set the location to the VirtualLocation type.
- Set the eventAttendanceMode property to OnlineEventAttendanceMode.
For more information about VirtualLocation type, please refer to the developer documentation.
Update Google when your event changes
A soon as your event status has changed and you change your website and Structured data markup, make sure you update Google with those changes.
Google recommends making our sitemaps available automatically through our servers. This is the best way to automatically update Google about changes in our website’s markup.
To test your structured data markup you can use the Google structured data testing tool. What works better for me is Google Chrome Extension Structured data testing tool.
Comments
Leave a Comment