Welcome to WebmasterWorld Guest from 54.224.108.238

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Getting "Events" listed on Google... schema issue?

     
6:32 am on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 901
votes: 74


I searched for a nearby town tonight on Google (just typed "City ST") and on the right they had a list of events listed. Underneath each event was a "Source", with a link to one of my competitor's websites.

I looked at their event listings and didn't see anything special. I assume it has something to do with Schema, but that's practically Latin to me so I've just set it up based on the Google Webmaster Tool:

<a name="20171209"></a>
<div itemscope itemtype="http://schema.org/Event" style="padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #E5E5E5">
<p class="p_2"><b itemprop="name">[Event Name]</b></p>
<div class="p_2 small"><i itemprop="startDate" content="2017-12-09">Saturday, Dec 9</i></div>
<div class="p_2 small" itemprop="description">
[Event Description]
<a href="https://www.example.com/events/[event-name]/17150/" style="color:#8080FF">click for more info</a>
</div>
<div class="p_2 small">
<i itemprop="location" itemscope itemtype="http://schema.org/Place">
Location: <span itemprop="name">[Event Location]</span>
</i>
</div>
</div>


Do you see something wrong with my code that would prevent it from getting listed? Or is there something else I should be doing to get the events linked with the city or county name?
9:31 am on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2006
posts:2696
votes: 112


You can run it through google’s markup validator
[search.google.com...]

Looks like you need to include an address as well
11:31 am on Dec 9, 2017 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:12157
votes: 348


Worth noting that we also have a current thread that's discussing the misuse of event markup...

Google Warns About Event Markup Abuse May Result in Manual Action
https://www.webmasterworld.com/google/4878891.htm [webmasterworld.com]

It's a cautionary thread that might be worth a look, just to make sure you're not stretching the definition of "event".

As with all schema markup, the markup only helps in get marked up results in the serps. Keep in mind that Google also looks at what we can loosely call "trust" factors, and some sites may not get listed until they've established sufficient credibility.

I'm amazed at the number of events announcements I see neglict crucial information... things like time, place, duration, topic, admission, etc... and instead refer you to their website or Facebook page for what really should be in the announcement. IMO, the information should be right there, every time.

3:24 pm on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2044
votes: 529


I like to use JSON-LD. It appears to work, as Google includes at least some elements in search results. But this site has relatively little traffic and thus not the best rankings.

The nice thing with JSON-ld is that it appear separate from the page content, so it does not require all the strange mark-up. Also I use a mongoDB backend so I get the JSON markup directly out of the db without any parsing or formating required. Here is an example:


<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Event",
"name": "Example Event",
"startDate": "2017-12-09",
"location": {
"@type": "Place",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 West Blvd.",
"addressLocality": "Example City",
"postalCode": "12320",
"addressRegion": "EX",
"addressCountry": "United States"
}
},
"description": "This event is an example",
}
</script>
6:32 pm on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 901
votes: 74


I like that approach, Nick, much cleaner and easier! I would love to do that, but how/where do you link to the JSON-LD for Google to fetch it? Is it instead of applying the schema markup to the HTML output? If so, that would make the page marginally smaller, too, which would lead to faster load time...

Looks like you need to include an address as well

The above code comes from the list of events, where the user clicks for more information. The listing page has more details, like time, address, admission, etc.

The detail page has the same schema markup, but do you think that's the reason that Google isn't linking it? The list page is already quite large, and since the website is specific for one county then listing the city and state would be rather silly (it's understood, and they'll all have the same data). So adding all of the information would definitely make for a negative user experience :-(

Can it be hidden? Eg:

<div style="display: none" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="addressLocality">City</span>,
<span itemprop="addressRegion">ST</span>
</div>


Worth noting that we also have a current thread that's discussing the misuse of event markup...

Thanks, Robert! I did read through the initial topic yesterday, but I don't think that the events I have listed would be considered "misuse". The users submit them manually, but they are moderated, so only legit events are posted; right now they are mainly Christmas events like the town's Light Up ceremony, Christmas plays at churches, vineyard events, things like that.
6:56 pm on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 901
votes: 74


Can it be hidden? Eg:

Nevermind that, I answered my own question. The proper usage is with META tags:

<i itemprop="location" itemscope itemtype="http://schema.org/Place">
Location: <span itemprop="name">[Event Location]</span>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="addressLocality" content="[City]">
<span itemprop="addressRegion" content="[ST]">
</div>
</i>


The markup tool shows no errors now (but with 4 warnings) so I'm hoping that will have fixed it :-) Thanks for the tips!

But if using the JSON-LD is easy then it may still be a better option, I'm very interested in that one...
7:16 pm on Dec 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2044
votes: 529


Here are the details on JSON-LD Mark-up, straight from the horses mouth:
[developers.google.com...]
7:51 pm on Dec 10, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 901
votes: 74


Nick, I'm struggling finding exactly how to do this. The documentation just says:

JavaScript notation embedded in a <script> tag in the page head or body


But... how? A search on Google says to do this:

<link type="application/ld+json" rel="alternate" href="https://www.example.com/jsonld.js">


But then replies to that say that Google doesn't accept it that way, it needs to be in a SCRIPT tag. Like so:

<script type="text/javascript" src="https://www.example.com/jsonld.jsonld"></script>


Notice that the first uses a JS extension, and the second uses a JSONLD extension. And neither have clear responses on which way is appropriate.

In retrospect, I really need for it to be a PHP script, anyway; all of my data is in MySQL and changes regularly, so I'll need a script to read the MySQL and convert it to the JSON format. So can it be this?

<script type="text/javascript" src="https://www.example.com/jsonld.php?source=[link to whatever page is being viewed]"></script>


And finally, if using the SCRIPT tag is best, can it be at the bottom of the BODY so that it doesn't slow down the page load time?
1:55 am on Dec 11, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2044
votes: 529


It is very simple, all you do is add this block of key value pairs in your html with the script tag. You can put it at the bottom of the page if you like. As for populating it, typically all the data that appears in the JSON-LD also appears on the page. And generally the keys don't change, so an event always has name, an address and so on. I am use a templating script where I simply replace the value in the key:value pair eg: "name" :{{event_name}} where "event_name" is replaced by "Example Event".


<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Event",
"name": "Example Event",
"startDate": "2017-12-09",
"location": {
"@type": "Place",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 West Blvd.",
"addressLocality": "Example City",
"postalCode": "12320",
"addressRegion": "EX",
"addressCountry": "United States"
}
},
"description": "This event is an example",
}
</script>