Google Event Markup (JSON)
-
Thanks for all your efforts with EME, it’s a great plugin and has helped me get a small community group off the ground.
I would like to improve my site by getting the EME events to show properly in Google search results. The best way to do this seems to be to embed a JSON LD object into each event page with the event details. I’ve tried doing this by adding the following SCRIPT block under the HTML in the “Default single event format” field in the Event, Settings page:
{I’ve removed the leading < on the SCRIPT tag so it isn’t stripped/processed by the forum!}
SCRIPT type=”application/ld+json”>
{
“@context”: “http://schema.org”,
“@type”: “Event”,
“location”: {
“@type”: “Place”,
“address”: {
“@type”: “PostalAddress”,
“addressLocality”: “#_TOWN”,
“addressRegion”: “#_STATE”,
“postalCode”: “#_ZIP”,
“streetAddress”: “#_ADDRESS”
},
“name”: “#_LOCATIONNAME”
},
“name”: “#_EVENTNAME”,
“offers”: {
“@type”: “Offer”,
“price”: “#_PRICE”,
“priceCurrency”: “#_CURRENCY”,
“url”: “#_EXTERNALURL”
},
“startDate”: “#_{Y-m-d}T#_24HSTARTTIME”,
“endDate”: “#@_{Y-m-d}T#_24HENDTIME”,
“description”: “#_EVENTDETAILS”,
“isAccessibleForFree”: true,
“maximumAttendeeCapacity”: “#_TOTALSPACES”,
“remainingAttendeeCapacity”: “#_AVAILABLESPACES”,
“url”: “#_EXTERNALURL”
}
/SCRIPT>Unfortunately the SCRIPT block is stripped out when the settings are saved.
Is there a better way to do this?
Could this maybe be considered for a new feature in a future version?Thanks for your help!
The page I need help with: [log in to see the link]
The topic ‘Google Event Markup (JSON)’ is closed to new replies.