SEO

If you're having difficulty adding schema markup to your site via your CMS, use Google Tag Manager instead - it's hassle free and doesn't require any prior coding knowledge.

Recently, I wanted to add Schema Markup to a client’s website but encountered a problem: their site is built on an old version of WordPress and uses an old SEO plugin that doesn’t support schema.

Not wanting to undo all the SEO work on the site, I didn’t want to remove the plugin and add a new one, in case any valuable data was lost and their rankings were affected. Also, I couldn’t find a schema plugin that would work on their site.

Cue the answer to all my problems, and possibly my favourite tool: Google Tag Manager. With a little research and no need to contact the IT department, the job was done in around 10 minutes!

So let’s back up a second, as you may be asking yourself “what is schema markup?” and “what is tag manager”? I’ll briefly provide you with an overview of what these are, then show you how to add schema to your site with Google Tag Manager. It’s surprisingly very simple despite sounding difficult, so bear with me.

What is Schema Markup?

Originally developed when the world’s leading search engines collaborated to create a simple, comprehensive way of categorising and displaying information on different websites, schema markup adds structured data to a site.

Structured data is information that is written and formatted in such a way that it can be universally understood by search engines.

Having schema on your website is becoming increasingly important nowadays, as it’s used by search engines to easily understand your website in order to display information about you in search engine results pages. This includes information like organisation details, reviews from other sources and articles.

Search engines are becoming increasingly reliant on it to understand pages: gone are the days of messy code. It’s an aspect of technical SEO that’s very simple to implement and is necessary in order for you to compete in search engines.

There are a multitude of types of schema markup. In this post, I’m going to focus on “Organisation”  – structured data which describes your business to search engines (name, address, contact info etc) and is very useful for local SEO.

What is Tag Manager?

Google Tag Manager (GTM) is a free tool provided by Google which makes it easy for webmasters and marketers to add and update website tags. In other words, it lets you add code snippets to the site, without actually having to change the code on the site. There are many ways to use GTM, but most businesses use it for event tracking, as a means of measuring the success of their digital marketing strategy. For a more in-depth explanation of GTM, check out our introductory blog post.

These are the basic components of Google Tag Manager:

  • The Data Layer: a sort of database that stores all of the information that you wish to record about how users are behaving on your site and how they are interacting with your content. This data is then sent to Google Analytics using GTM, meaning that you can then see this behaviour in Analytics.
  • The Container: this is basically the element that “contains” your set of macros, rules and tags.
  • Tags: A tag is HTML code that fires on a page when that page is viewed by a user.
  • Triggers: This is essentially the rule that you create which specifies when a tag should be fired on a website (for instance, when a specific page is viewed or a button is pushed).
  • Macros– A pre-defined set of conditions that allow rules to be executed.

Here is Google’s own guide on how to create your GTM account and set up your first container.

Now Add Schema Markup to your site Using Tag Manager

So, now that you understand the basics, and have got your tag manager account set up with it’s container – here’s how to do add schema markup to your site via GTM.

  • Create the schema
    First things first: the following is an example of organisation schema code. Copy the example that has Hallam info within it, paste it into notepad and simply change the company information to your own company info.

<script type=”application/ld+json”>
{ “@context”: “http://schema.org”
“@type”: “Organization”,
“name”: “Hallam”,
“url”: “https://www.hallaminternet.com/”,
“logo”: ” https://www.hallaminternet.com/assets/google-tag-manager-logo-300×135.jpg”,
“foundingDate”: “”,
“founders”: [
{
“@type”: “Person”,
“name”: “Susan Hallam”
},
{
“@type”: “Person”,
“name”: “”
} ],
“address”: {
“@type”: “PostalAddress”,
“streetAddress”: “The Clock Tower, Talbot Street”,
“addressLocality”: “Nottingham”,
“postalCode”: “NG1 5GG”,
“addressCountry”: “UK”
},
“contactPoint”: {
“@type”: “ContactPoint”,
“contactType”: “customer support”,
“telephone”: “[+440115-948-0123]”,
“email”: “[email protected]
},
“sameAs”: [
“https://www.facebook.com/HallamInternet/”
“https://twitter.com/HallamInternet”,
“https://www.linkedin.com/company/hallaminternet”,
“https://plus.google.com/+Hallaminternet”
]}
</script>

  • Create the trigger and tag in GTM

Once you’ve logged into your Tag Manager account:

1. Select the container you wish to make changes to.

2. Create a new tag to add the schema to.

3. Click to add a trigger: create a new trigger set to “page view” and then “all page views”.

4. Go back to you dashboard and do the following:

schema-markup-gif

5. Once you’ve clicked preview and debug mode (which is there to check the changes are working before you set them live on the site), load up your website and at the bottom of the page a box will notify you about whether or not your tag worked. If it didn’t, go back through each step and check that you set the tag up correctly. If it worked, go ahead and publish it!

6. Once published, go to Google’s Structured Testing Tool, add your website’s URL and it’ll tell you’ve whether the schema is working on the site in the results panel. And that’s it, you’re done!

 

14 responses to “How to Add Schema Markup to Your Site with Google Tag Manager”

  1. Nigel Bogle says:

    Hi Eleanor, I had the opportunity to meet up again with Susan at an event in Northern Ireland recently and it was very good indeed. Susan used to be a lecturer whilst I was at Nottingham Trentham Uni.

    On the back of this I’ve been following you guys and your content is excellent. It has inspired me to move my own business on in the context of Web and social media.

    I’ve tried to do what you’ve suggested above though but it makes no difference to our search result profile. It’s been on our site for a couple of months now using Google Tag Manager.

    I’ve tested using the structured data testing tool and all looks fine but it simply doesn’t work.

    Our domain is http://www.lccs.co.uk if you want to see what I mean.

    Any thoughts for me / other folks family in the same issue given the article?

    Best wishes to all at Team Hallam

    Nigel

  2. Nigel Bogle says:

    … (typo) Should have been Nottingham Trent Uni.

    N.

  3. Eleanor Reynolds Eleanor Reynolds says:

    Hi Nigel,

    Thanks for the compliment on our posts, I’ll let the team know, they’ll be delighted!

    I’ve had a look and like you say the structured data is certainly working on the site.

    Do you mean that it’s not made a difference to the knowledge panel that appears when people search for your business? Let me know what you mean and I’ll look into it for you!

    Kind regards,

    Eleanor

  4. Nigel Bogle says:

    That’s exactly it…! Been scratching my head for ages.

  5. Eleanor Reynolds Eleanor Reynolds says:

    Hi Nigel,

    I’ve asked Google themselves about this and they’ve provided a pretty frustrating answer:

    “Hi Eleanor,
    Thanks for your question. Displaying social profiles for businesses in search results on Knowledge panel is a relatively new feature which we are improving and enhancing each day. Social profiles are triggered from specific mark up codes on the business website. Here is an article from our developer site which shows how these mark up are formatted and utilized for your (or your webmaster’s) review: https://goo.gl/XL020a .
    Utilizing mark ups on your website will greatly improve your opportunity to display your social profiles but is not a guarantee that all or any of these profiles will display.”

    Essentially: you’re doing everything right and sending the right signals to search engines, unfortunately it’s just not guaranteed that Google will display the results. However, as it’s a “relatively new feature” I think that it’s just a matter of time before it starts displaying.

    I’m sorry I couldn’t be more helpful! Let me know if you have any more question, my email address is [email protected] if you ever have any other questions!

    Kind regards,

    Eleanor

  6. Nigel Bogle says:

    Hi Eleanor, Thank you sincerely for your note; faultless service but then I’d expect that from anyone connected with Susan. She is all about the details.

    The Google reply seriously calls into question why they bother putting this stuff out into the user ‘space’ if they are simply going to ‘see how they feel’ about actually using the structured information or not.

    It certainly does not install any confidence whatsoever for anyone to go to all the trouble to learn these things and do these things if the bottleneck is at source.

    Unfortunately it does also cast a bit of a shadow on the content good marketing companies, like Hallam, are putting out there. You create a detailed blog about an interesting subject only for Google to say…

    Hmm… we see how it goes and if we can be bothered about using this then we might but no guarantees.

    In this respect I’m afraid Google remain a mystery and a major disappointment..!

    Thank you for your efforts and look forward to more posts for you and the great team @HallamInternet

    Nigel.

  7. Susan Hallam Susan Hallam says:

    I feel your frustration, Nigel!

    But try to look on the bright side: Google is constantly rolling out new features and functionality, and it will give your business serious competitive advantage if you are ahead of the curve in being ready for when these new features roll out more widely.

    The beauty of something like Scheme Markup is that your effort won’t be wasted: they are potentially used by the search engines in many different ways in rich snippets, in the knowledge pane, in improving rankings.

    Keep us posted!

  8. Nigel Bogle says:

    Hi Guys,

    As a follow up to this I felt I ought to say that our profiles have now miraculously started to appear after months of nothing.

    Whether it was coincidence, your influence or Google bots just managing to get around to consuming the structured data content, they are now there.

    Thanks again for being a great source of content Eleanor and for the work you guys do. I’m off now to enjoy the latest Hallam Newsletter that has just dropped into my inbox!

    Have a great day.
    Nigel.

  9. Eleanor Reynolds Eleanor Reynolds says:

    Excellent news Nigel, I’m glad to hear that it’s working for you! Enjoy the newsletter and have a lovely weekend,
    Eleanor

  10. Dear Ms Eleanor

    I really hope that you can create a Youtube video for demo GTM,

  11. Hi there!

    I’m not sure what you mean by, “and it’ll tell you’ve whether the schema is working on the site in the results panel.” in step 6. I’ve done exactly as you said. When I test my website’s URL, none of the “Organization” JSON-LD code appears. Is that normal?

    My website’s URL is https://cronaldodaily.com by the way.

  12. Eleanor Eleanor says:

    Hi Angela,

    When you test the URL in the structured data testing tool, the organisation schema should appear in the right hand panel of the tool. If it doesn’t, this usually means that either GTM isn’t correctly added to the site (which you can test by trying something else out with it) ot that the schema code that you added is incorrect in some way (there may be a comma missing or a missing closing tag etc.).

    I hope that this helps,

    Thanks,

    Eleanor

  13. BB says:

    I’m a grammar nerd. Sorry.

    “It’s surprisingly very simple despite sounding difficult, so bare with me.”

    s/b “bear with me,” a request for forbearance or patience.

    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *