Senior Full-Stack Engineer in Bangkok, Thailand
By definition, structured data refers to a high degree of organization and quality in presenting data to search engines.
For example, imagine you have a website with various subpages — search engines can index these pages and figure out the content. However, it can take time. Especially depending on how much traffic your website gets.
By explicitly telling search engines what your page contains, you allow them to easily index, display, and generate rich results or snippets when possible.
In the first image, you can see search results appearing in the Google carousel. Two are marked up as VideoObjects that link to their respective players. Similarly, in the second image, you can see a list of events (movies) available on the page.
There are various ways to approach structured data. Two common, and simplest in terms of development, are Microdata and JSON-LD.
Microdata consists of inline HTML attributes defining Schema.org vocabulary; such as the type of content being displayed. This is the least recommended way of defining structured data, even by the creators themselves.
Nevertheless, supplying structured data is better than not supplying anything at all. In my experience, I don’t think it should be disregarded entirely for JSON-LD. Microdata works nicely with auto-generated markup which I will get to later on.
There are many data types which you can choose from that are supported by both Google and Schema vocabulary, but each have their respective differences. For the rest of the examples, we’ll be using Breadcrumbs and Movies.
Breadcrumbs are used as a navigational aid for users to see which page they are currently on and all of the previous ones leading back to the root of the site.
In this example, imagine we are on the subpage: www.example.com/movies/mission-impossible-fallout
Breadcrumbs seem self-explanatory, but in fact, you need to do some special things in order to get Google to index your data correctly.
Firstly, the root element “Home”, cannot be an item of the breadcrumb object. Otherwise, Google will index your root site twice like the following:
www.example.com › Home › Movies › Mission Impossible: Fallout
In actuality you’d want to link your website like so; Home is the root page.
www.example.com › Movies › Mission Impossible: Fallout
Secondly, the first subpage “Movies” is level 1, and “Mission Impossible: Fallout” is level 2. However, you should not link the current page!
As mentioned above, you should not include the root page as a listItem inside the BreadCrumbList, but you can still make a link to it with no downsides.
The first subpage needs:
1). To be of type ListItem
2). Have a position (level) of 1
3). Contain a separator item after the current item such as › > | ||, etc.
In Google’s examples, the › separator is used frequently, so that’s what I stuck with
Strangely enough, the Movie object is entirely supported and shows up in rich snippets/results but is not included in the list of support data-types.
Movies come in various forms of results depending on the device and search query.
In theory, rich results such as videos and movies improve click through rate.
These look great, right? Let’s generate some markup! Not so fast bucko... Google has an obvious obligation to promote their own platform, YouTube, first. It can be extremely difficult to get previews like this in the SERPS.
It’s unlikely you’ll get rich results within days or even weeks after implementing them. It’s decided by Google and their hidden algorithms, marking up all data correctly, and a lot of luck. Be patient.
Google has nice tools to test structured data and sometimes even allow you to see an example “preview” of what the search engine would generate from your markup. The first tool I recommend using is the structured data testing tool.
This tool allows you to fetch structured data through a website crawler and/or paste the code snippet in directly to see valid/invalid microdata and JSON-LD.
"name":"Mission Impossible: Fallout",
"description":"Ethan Hunt and the IMF team join forces with...",
When you supply enough information to apply for a possible rich result in Google, a button named [PREVIEW] will show up. Don’t be alarmed if your result looks different than the one below. A variety of factors (always, right?) plays a role in generating a correct thumbnail. If the image was recently uploaded or not indexed by Google, the preview may show blank or even nothing.
Unfortunately, Google is going through a phase of many beta versions of the search console, analytics, and data structure testing. While testing, be aware if you supply information with minimal warnings and no errors, your markup or JSON-LD is most likely valid.
That being said, this tool will generate a nice preview. Albeit, only for mobile view.
Under Search Traffic › Search Analytics › Search Appearance
Please note; search results are delayed by 3 days.
There are two main types of events. Short term and Long-Term.
These events get indexed by Google every day, as long as there are more events available. This can be useful if your content or event has a very short lifespan.
If you have a long array of events ready to be picked out by Google, this would be the recommended way to show events. The rich results will change constantly, so long as there is data available. With this, impressions for this result will increase — in theory improving click-through rate to your page.
Specifying your data as short-term events when not having enough data could cause search results to be less desirable.
Events get indexed with a starting and ending date. The indexed result will remain until at least one becomes expired.
Exact dates for an available event can be very important in cases where events last many days or even weeks. e.g. a multi-day music event.
This has come up before in development; if you let Google decide which date to show by itself (3 maximum events at a time on Desktop and Mobile; excluding other search results) — you could be stuck with data that you don’t want to be displayed. This can take up until at least one event becomes expired.
There is no one right way to describe to search engines what your page contains. Do what makes sense.
There are many tools to use to see social sharing previews, validate structured data, and view valid markup examples.
Steal Our JSON-LD: a great tool to see valid JSON-LD snippets.
Schema.org Examples: simply put; this is a complete dictionary by the creators themselves. I highly recommend testing with the microdata/JSON-LD examples.
Structured Data Testing Tool Chrome Extension: I found out about this after completing event markup on a very popular page. Nonetheless, it’ still very handy when quickly troubleshooting structured data.
If you enjoyed this content, please consider supporting me with the clap icon. If you have any questions, comments, or all of the above, feel free to comment below or send a private message.