Skip to content

feat: enhance event page structured data #914

@alexgoff

Description

@alexgoff

Context
We have structured data on our event pages that Google has started picking up. The current data is a little incomplete, and some events do not have locations because they are virtual. We can provide some enhancements to improve the display of these structured pieces and offer more tools to our content team

Google guidelines for event structured data: https://developers.google.com/search/docs/appearance/structured-data/event

Structured data schema for events:
https://schema.org/Event

Work

Enhancements to the structured data on events pages to add:

  • in person, hybrid, or virtual event
  • updated location for virtual events
  • image, from hero

Craft
In the address area of the event page fields add a new field:

  • Event type: in person, virtual, or hybrid (default in-person)
    • if in person or hybrid, conditionally show the address fields

Client

  • Add the new event type field to the eventFragmentFull GQL query in lib/api/fragments/event.js (this is an old school un-typed query)
  • Modify the structured data in components/templates/EventPage to include eventAttendanceMode based on the new event type field
  • If the event is virtual, change the @type of the location to VirtualLocation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions