issues getting schema.org right for multiple sportsevents

Neil Thompson
Neil Thompson used Ask the Experts™
on
hi

I'm fairly new to the schema.org side of things and wanted to add some data for our rugby club for the next matches to be shown on the google search results.

When validating only the first event comes up and I'm getting an exclamation mark next to my use of "SportsEvent" at the top. I'm wondering If this should be RugbyClub with the events created under them?

Would anyone be able to steer me in the right direction by correcting this piece of code, or pointing me to some working examples I can learn more from.

Thanks, Neil


<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "SportsEvent",
  "name": "Lordswood First XV",  
  "awayTeam": "Lordswood",
  "homeTeam": "Sheppey",
  "startDate" : "2016-02-13T14:00",
  "endDate" : "2016-02-13T16:00",
  "url" : "http://www.lordswoodrfc.co.uk/teams/lordswood-1st-xv/fixtures/",
  "location" : {
    "@type" : "Place",
    "sameAs" : "http://www.pitchero.com/clubs/sheppeyrfc",
    "name" : "Sheppey Rugby Football Club",
    "address" : "Lower Rd, Sheerness ME12 3ST"
  }
},
{
  "@context": "http://schema.org",
  "@type": "SportsEvent",
  "name": "Lordswood First XV",  
  "awayTeam": "Beccehamian",
  "homeTeam": "Lordswood",
  "startDate" : "2016-02-20T14:00",
  "endDate" : "2016-02-20T16:00",
  "url" : "http://www.lordswoodrfc.co.uk/teams/lordswood-1st-xv/fixtures/",
  "location" : {
    "@type" : "Place",
    "sameAs" : "http://www.lordswoodrfc.co.uk",
    "name" : "Lordswood Rugby Football Club",
    "address" : "The Clubhouse, North Dane Way, Chatham ME5 8YE"
  }
}
</script>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
"startDate" : "2016-02-13T14:00",
  "endDate" : "2016-02-13T16:00",

 combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm
You're missing the timezone and possibly the seconds
 "startDate" : "2016-02-13T14:00:00Z+5",   //Eastern Standard Time
  "endDate" : "2016-02-13T16:00:00Z",       //UTC
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Jumping in the deep end here so hopefully this is useful

Having read the SportsEvent page on schema.org( https://schema.org/SportsEvent) it seems to suggest that you should create your games as sub-events. Their example creates the World Series as an event with games as sub-events which seems to be similar to what you are doing.

I have no way of testing but I would try that
Neil ThompsonSenior Systems Developer

Author

Commented:
Thanks guys, I've altered the time to the correct zone now using the Z

I've also tried the sub-event but this appears to require all the events to take place in 1 location as the root "sportsEvent" needs a location.

This is what I have so far which seems to validate ok, just waiting for Google to re-index to see what it turns out like

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "SportsEvent",
        "name": "Lordswood 1st XV",
        "awayTeam": {
            "@type": "SportsTeam",
            "name": "Lordswood",
            "sameAs": "http://www.lordswoodrfc.co.uk"
        },
        "homeTeam": {
            "@type": "SportsTeam",
            "name": "Sheppey",
            "sameAs": "http://www.pitchero.com/clubs/sheppeyrfc"
        },
        "startDate": "2016-02-13T14:00",
        "endDate": "2016-02-13T15:30",
        "url": "http://www.lordswoodrfc.co.uk/teams/lordswood-1st-xv/fixtures/",
        "location": {
            "@type": "Place",
            "sameAs": "http://www.pitchero.com/clubs/sheppeyrfc",
            "name": "Sheppey Rugby Football Club",
            "address": "Lower Rd, Sheerness ME12 3ST"
        },
        "offers": {
            "price": "0",
            "url": "http://www.pitchero.com/clubs/sheppeyrfc"
        }
    }
</script>
<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "SportsEvent",
        "name": "Lordswood 1st XV",
        "awayTeam": {
            "@type": "SportsTeam",
            "name": "Beccehamian",
            "sameAs": "http://www.pitchero.com/clubs/beccehamianrfc"
        },
        "homeTeam": {
            "@type": "SportsTeam",
            "name": "Lordswood",
            "sameAs": "http://www.lordswoodrfc.co.uk"
        },
        "startDate": "2016-02-20T14:00",
        "endDate": "2016-02-20T15:30",
        "url": "http://www.lordswoodrfc.co.uk/teams/lordswood-1st-xv/fixtures/",
        "location": {
            "@type": "Place",
            "sameAs": "http://www.lordswoodrfc.co.uk",
            "name": "Lordswood Rugby Football Club",
            "address": "The Clubhouse, North Dane Way, Chatham ME5 8YE"
        },
        "offers": {
            "price": "0",
            "url": "http://www.lordswoodrfc.co.uk"
        }
    }
</script>

Open in new window

Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
From this page https://schema.org/subEvents
An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference.

I read that as sub-events being a collection of events - which can then have their own location. The example above for conferences - each presentation needs a venue - which is a location.

As I said before only just dived into this pool so may be speaking out of turn - but this how I would read the docs.
Neil ThompsonSenior Systems Developer

Author

Commented:
Hi Julian

You are right but my requirements are slightly different. This is for a rugby team that play matches weekly either at home or away so there will not be a fixed initial location such as an "arena" which is then divided into smaller "zones" as such to host the subEvents.

I was looking at your example to try to make a 2016 Matches "event" with every actual first/second team home/away match as sub events but it doesn't like that.

Thanks for all your help though guys, you've both given me helpful info and examples that I can go on to use elsewhere :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial