mozilla / mozillafestival.org

The Mozilla Festival site
https://mozillafestival.org
Mozilla Public License 2.0
31 stars 24 forks source link

Add Event Specific Structured Data for Google #1008

Closed marcwalsh closed 6 years ago

marcwalsh commented 6 years ago

I was doing some research into SEO for events and Google supports event specific structured data.

Google's guidelines are available here: https://developers.google.com/search/docs/data-types/event

Implementation Docs are Available here: https://developers.google.com/search/docs/guides/intro-structured-data#technical-guidelines

This will add a small snippet of text below the search results showing the location, dates and ticket link, and hopefully will give us something similar to the image below (this might need some work in Google's Search Console.

I'll add copy in the comments below.

marcwalsh commented 6 years ago

Preview avaialble here (mobile view only).

@Saallen are you okay with the shorter description taken from the longer SEO description? "Mozilla Festival (MozFest) brings the world together to leave the internet better than we found it."

JSON-LD code (for just weekend) below:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Event",
  "name": "Mozilla Festival 2018 Weekend",
  "startDate": "2018-10-26",
  "location": {
    "@type": "Place",
    "name": "Ravensbourne",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "6 Penrose Way",
      "addressLocality": "London",
      "postalCode": "SE100EW",
      "addressCountry": "GB"
    }
  },
  "image": [
    "https://mozillafestival.org/assets/images/site-thumbnail.jpg"
   ],
  "description": "Mozilla Festival (MozFest) brings the world together to leave the internet better than we found it.",
  "endDate": "2018-10-28",
    "offers" : [ {
        "@type" : "Offer",
        "name" : "MozFest Weekend",
        "price" : "45",
        "priceCurrency" : "GBP",
        "availability" : "InStock",
        "url" : "https://mozillafestival.org/tickets",
        "validFrom" : "2018-07-01",
        "validThrough" : "2018-10-28T20:00"
    },{
        "@type" : "Offer",
        "name" : "MozFest Weekend (Youth)",
        "price" : "3",
        "priceCurrency" : "GBP",
        "availability" : "InStock",
        "url" : "https://mozillafestival.org/tickets",
        "validFrom" : "2018-07-01",
        "validThrough" : "2018-10-28T20:00"
    },{
        "@type" : "Offer",
        "name" : "MozFest Weekend (Benefactor)",
        "price" : "155",
        "priceCurrency" : "GBP",
        "availability" : "InStock",
        "url" : "https://mozillafestival.org/tickets",
        "validFrom" : "2018-07-01",
        "validThrough" : "2018-10-28T20:00"
    } ]
    }
</script>
Saallen commented 6 years ago

approved

marcwalsh commented 6 years ago

Additional MozFest House script below - not sure if these can be combined into one - when I'm trying on the validator I can't get it right...

<script type="application/ld+json">
 {
  "@context": "http://schema.org",
  "@type": "Event",
    "name": "MozFest House 2018",
    "startDate": "2018-10-22",
    "location": {
    "@type": "Place",
    "name": "The RSA",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "8 John Adam St",
      "addressLocality": "London",
      "postalCode": "WC2N 6EZ",
      "addressCountry": "GB"
    }
  },
  "image": ["https://mozillafestival.org/assets/images/site-thumbnail.jpg"],
  "description": "MozFest House features films, workshops, conferences, and talks, all focusing on Internet health and showcasing the diversity of the Mozilla network. The venue also features a free co-working space.",
  "endDate": "2018-10-26",
    "offers" : [ {
        "@type" : "Offer",
        "name" : "Individual Tickets",
        "price" : "0",
        "priceCurrency" : "GBP",
        "availability" : "InStock",
        "url" : "https://mozillafestival.org/house",
        "validFrom" : "2018-07-01",
        "validThrough" : "2018-10-28T20:00"
    },{
        "@type" : "Offer",
        "name" : "MozFest All Access Pass",
        "price" : "175",
        "priceCurrency" : "GBP",
        "availability" : "InStock",
        "url" : "https://mozillafestival.org/tickets",
        "validFrom" : "2018-07-01",
        "validThrough" : "2018-10-21T23:59"

    } ]
    } 
</script>
sabrinang commented 6 years ago

@marcwalsh any updates? moving to this heartbeat

marcwalsh commented 6 years ago

@mmmavis - would you be free to have a 15/30 min chat on how to add this.

mmmavis commented 6 years ago

Hey @marcwalsh I haven't had time to check out the documentation yet. If a GitHub ticket is labelled as "enhancement" I will check it out it only when I have spare bandwidth. I'm currently pretty busy with all the CFP close site updates. If we wanna get this ticket done by this heartbeat the earliest I can tackle this ticket is Monday Tuesday (Monday is holiday in BC, Canada) next week.

marcwalsh commented 6 years ago

Hey @mmmavis no urgency here - it's a nice to have which is why I listed as an enhancement. When you get some time we can look into it more.

:)

mmmavis commented 6 years ago

@marcwalsh I pasted your code snippet into the validator and got 1 warning back

screen shot 2018-08-03 at 4 58 37 pm
marcwalsh commented 6 years ago

@mmmavis I've happy with that - the performer field is only used if you have an artist. The search engine would use that to list concerts under the artist you're searching for.

mmmavis commented 6 years ago

I've added the code snippets in. Thanks for providing them @marcwalsh

Test results are here:

I'm not sure when the info will show up on Google search results as data crawling on Google can take days to weeks. I'm gonna keep this ticket open until we can confirm the code works as expected.

mmmavis commented 6 years ago

Closing this ticket since 1) we don't wanna keep tickets lingering 2) we have done everything we could on our end