Structured data is coded in the JavaScript or HTML of your page in order to send Google information describing your page. This is a way to tell Google explicitly what it needs to know so it doesn’t have to gather clues from a jumble of code. It also classifies your page content into categories like the following: Article, Product, Recipe, Review, Event, Local Business, Job Posting, or even simply Web Page. All of these things will help your page rank better in searches.

How to add structured data to your website

The recommended format for doing this is JSON-LD, a JavaScript notation. I’ve found it to also be the easiest method since it restricts all of your structured data to one location in your code. It does require a bit of understanding of the format, but I found the documentation easy to read and quick to implement. Below is a simple example for an article page:

Structured data example for your website

Note the @type that’s used to classify not just the main page, but also elements within the description, such as the author and the publisher, types Person and Organization respectively. One programming caveat: when working with JSON, you have to be really strict with your use of commas. When listing keys in your object, you cannot put a comma after the last value. PHP is very forgiving with this, so moving into JSON from PHP can be a bit of a wake-up call. For structured data, you especially need to watch when there are multiple key/value pairs that dynamically may or may not be included depending on the item. You may have to make trailing commas conditional on what comes after.

Why add structured data to your website?

Using structured data also makes you eligible for rich results

Google can take the information you give it and present it in new and interesting ways. Some of these include showing breadcrumbs under your link, adding a site search box beneath your site’s search result, adding your event to lists of events in a calendar, using your content to answer questions in a toggle, adding your job posting to a job search, creating a card for your local business, and displaying product information in the search results (such as price, availability and review ratings).

There are so many possibilities with structured data and the uses are only growing!


« Back to Blog

Are You Ready to Take Your Online Businessto The Next Level?