eventAttendanceMode: New Structured data Properties For Events
In the last couple of weeks, we are witnessing an unseen coronavirus outbreak. Many events around the globe got canceled due to COVID 19!
To inform your customers and attendees you probably used different channels to do so.
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.
Today, Google announces on 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.
|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
Event moved online
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 to 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.
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.
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 us to make 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 or what works better for me is Google Chrome Extension Structured data testing tool that I wrote about.