Use JSON-LD to add data to your website

In this post, we’ll shed some light on and JSON-LD. What is it and how can you put it to use for your website?

There are many ways to let Google and other search engines know what your page is about. Next to writing awesome content, which should always be your starting point, we have also written about before. JSON-LD is a (relatively) new way to present data about your content to search engines. It comes with a few major benefits, so let’s dive in.

What is JSON-LD?

First, let’s look into what JSON-LD stands for, so we can really understand what it does.

JSON-LD, or JavaScript Object Notation for Linked Data, is a method of encoding Linked Data using JSON. (Wikipedia)

Let’s dissect that:

JSON is a lightweight data-interchange format, which is easy for humans to read and write and easy for machines to parse and generate.

Linked Data is about using the internet to connect related data.

JSON-LD is a combination of both. So it’s a code snippet that tells you what price belongs to what product, or what zip code belongs to what company. Basically, instead of adding attributes to individual elements on a page, you’re providing a small block of JavaScript code that has all that info.

Why use

What we are talking about here, is structured data for your website. provide ways to present your information to Google in a machine readable way. With that structured data you create the option for Google to show your content in two Google Search categories:

  • Rich results, which means your added content, like the price of your product, its rating and / or its availability, is literally shown in the search results as additional information in your snippet.
  • Site links search boxes, if your site is eligible, a feature already supported by our Yoast SEO plugin.
  • Knowledge Graph cards. This one is a bit harder, as you’ll have to prove first that you are the authority for certain content. After you have done so, Google might include your data into the Knowledge Graph.

As you can see, it’s really interesting to optimize your site using


The methods that were used to implement before JSON-LD was available, were cumbersome. You had to add attributes to pieces of code in your markup. The markup might have to change from page to page, even though you were including the same header everywhere, for instance. This made a pain to implement. For us as plugin (and thus back-end) developers, it pushed it entirely into the realm of front-end development.

JSON-LD allows you (and us) to collect all the data about your product and show them in one, small, piece of JavaScript code, that can just be pushed anywhere into the page. This allows you to work on a implementation using JSON-LD, independently of your theme development.

You can add basically any schema to your JSON-LD block, even breadcrumbs:


In fact, in its own documentation, Google often states JSON-LD is the easiest way to add metadata to sites. It’s the option that is least likely to break when you make other changes to your site.

Adding the script to your website

Luckily, JSON+LD is set up in a standardized format. Here’s an example of that format for a random product:

  "@context": "",
  "@type": "Product",
  "name": "Yoast SEO for WordPress",
  "image": "",
  "description": "Yoast SEO is the most complete WordPress SEO plugin. It handles the technical optimization of your site & assists with optimizing your content.",
  "brand": {
    "@type": "Thing",
    "name": "Yoast"
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": "69.00"

You can use any schema in JSON-LD. After adding a new JSON-LD script to your website, be sure to validate your code using the Google’s structured data test tool.

As you can see, this can easily be templated in your theme. There are generators like this one, which can be useful in setting up a template for that. If you are using WordPress, there are obviously plugins that can help you out as well.

Yoast SEO already uses JSON-LD to add information about your site search, your site name, your logo and your social profiles to your web pages.


Author: Search Engine Optimisation Company

Our team have been offering SEO expert services to clients since the early days of the internet. Whilst the tactics have evolved over the years, our overall goal by no means has and thats making sure our users web pages to rank on page 1 for appropriate keywords at the same time only using honest and long term strategies. Plan to Dominate the Search Engines? While many agencies are convinced that they have to resort to black hat SEO tactics to get results, we can get the 1st page rankings for all of our customers despite the fact that constantly guaranteeing we stick to strategies that are not frowned upon by the the search engines. What happens when you turn to black hat strategies? Without a doubt, you will get some early success, however the internet search engines will quickly discover what you are doing and you can face severe penalties which includes having your website banned with the google search results altogether. We work within guidelines of leading search engines such as Google, Yahoo and Bing! so you never need to be concerned about receiving any penalties as a result of the work we carry out for you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s