Running through Google’s structured data training

May 9th, 2018

I/O18 took place this week (I’ll be trying to get through some of the videos later today for ‘this week in search marketing’) – and Google created a structured data codelab for the occasion, which is now available to everyone


I’ve written fairly extensively (as has around 70% of people with an internet connection) on the importance of structured data to the future of search – so when I saw John Mueller’s tweet late last night, which offered access to a structured data codelab, I realised I had to try it out.



1. Overview

The first of five steps, the overview is precisely that – explaining that structured data assists the Google algorithm in its attempts to understand the context of a webpage. It then gives a summary of what to expect to learn from the training – which promises to “[walk] you through adding several types of structured data to a simple HTML site, including where to place your structured data on a site and how to validate structured data”:

  • Adding structured data to a simple HTML site
  • Avoiding common pitfalls
  • Testing and validating structured data

And what you’ll need to complete the training:

  • Chrome or another modern web browser
  • The sample code (provided in the next step)
  • A text editor (though it links to the Structured Data Testing Tool in case you don’t have one)
  • Some understanding of HTML and JSON syntax

2. Download the source code

This is simply a download button and description of what you’ll find in the zip file – which, once unzipped – should look something like this:


codelab zip image


3. Add recipe structured data

As you can see from the above image, the filenames for the example site code specifically matches to the recipe schema, so it’s no surprise that this is where the training starts. The introductory paragraph also clearly states that this markup will open up the potential to serve as voice guidance on the Google Home and a content action on the Google Assistant.

It then advises you to open the party coffee cake file in a text editor before copying and pasting the code in to Google’s Structured Data Testing Tool and running the test:


sdtt


This then returns a ‘detected’ result on the right hand panel – showing no markup present. It then goes on to give a walkthrough giving you step by step instructions for inputting the necessary script in to your header/body (I’ve chosen the header, as I like keep all scripts where I can find them) – showing that I’m not a true coder, I also use Dream Weaver and the deeply unfashionable white background.


json script


After adding the bare basics – including the “name” property, the instruction is to again test the code in SDTT to see that the type and name have been accepted but that it is missing a number of fields.


validate - missing elements


As will have been noted by eagle eyed search professionals (or people who track Search Engine Journal in their feed reader), Google has updated its recipe markup guidelines recently, moving four properties in to the ‘recommended’ category. While it’s unlikely to immediately impact rankings, it’s interesting to note the recent emphasis that has been placed on schema.

Once you’ve added in the listed fields, you’re prompted to validate the code again – this time returning a clear list of accepted fields and a single warning (aggregateRating – which the instructions tell me I’ll learn to add in the next step).


validate - present elements


4. Embed reviews within recipe structured data

Next, as promised, the walkthrough deals with adding reviews – starting by adding “review” @type below your existing recipe markup. The document then goes on to explain how to overcome the AggregateRating warning.

This is done as per the initial review process, with fields detailing the number of reviews and the average rating. Once this is done and the validation is complete with no errors, you are invited to preview how your markup would look on a search engine results page (SERP).


serp preview


5. Finished

Essentially a ‘links to other useful resources’ page, the final page ticks off the previously mentioned learning outcomes, then links off to a number of other Google tools and guides.

While the mini course doesn’t really offer anything new to anyone that has previously implemented schema markup, it does serve as an excellent resource for beginners and as a kind of best practice guideline for markup in general.

Whether you’re new to the process of implementing structured data, or are trying to communicate the basics to a client, this is certainly a useful resource.


Want something a little more advanced? Why not check out our ‘Advanced Guide to SEO’, or to see what Click Consult can do for your brand – contact us today.

Facebook Twitter Instagram Linkedin Youtube