"

Enrich Search Results with JSON-LD Markup through Google Tag Manager

measureschool.com/jsonld

In this video, we will take a look at how you can enrich your Google Search results by injecting JSON LD mark up throughout your site. This is done with the help of Google Tag Manager so jump on to learn how you can send the correct metadata to Google.

Introduction to JSON-LD: https://www.youtube.com/watch?v=vioCbTo3C-4

http://json-ld.org/
http://schema.org/
https://search.google.com/structured-data/testing-tool
https://developers.google.com/search/docs/data-types/data-type-selector
https://developers.google.com/search/docs/guides/search-gallery
GTM Live Workshops: https://measureschool.com/workshops
GTM Ressource Guide: https://measureschool.com/guide
Free GTM Beginner course: https://measureschool.com/emailcourse
Course: https://measureschool.com/course

RECOMMENDED MEASURE BOOKS: https://kit.com/Measureschool/recommended-measure-books

GEAR WE USED TO PRODUCE THIS VIDEO: https://kit.com/Measureschool/measureschool-youtube-gear

– [Voiceover] In this video I’m going to show you how you can enrich your Google.com search results by injecting JSON-LD markup onto your pages. We do all this with the help of Google Tag Manager. All the more coming up, so let’s dive in. Hi there and welcome to another video of measureschool.com. Where we teach you the data driven way of digital marketing. My name is Julian and today we want to talk about Jason LD. And today we want to tackle the question, how we can communicate to the Google bot that there’s meta information available on our page that can be used for enhancing our search engine results within Google.com. And you might have seen these rich snippets in other forms before, so Google has been implementing new forms of search engine results over the past few years. And they come in many different forms, but how do we actually tell the Google bot that there is this information available, and then hopefully this information will be incorporated into our results. Well if you have dabble in SCO, then your job is to enhance the results and the markup of the page. So you have probably built in commended tags into your HTML directly. In order to communicate this information to the Google bot. But a little while ago, Google actually announced that they would start accepting a new kind of data that doesn’t have to necessarily be implementing in the HTML, but can be deployed through JavaScript. And this new format is called JSON-LD. And if you want to find out more about JSON-LD there’s a great video which I’m going to link up below. The official documentation about these micro formats can be found at schema.org and Google also has a resource section about this new markup. The key here being that JSON-LD can be deployed via JavaScript and therefore Google Tag Manager can be used to deploy and communicate this information to Google bot. Additionally to these resources, Google has brought out a new testing tool which is the structured data testing Tool. Where you can implement any kind of website, and see how it is marked up and what kind of micro data is available here and if it is correct. So let’s see how we could implement such additional information like the rating here into our page through Google Tag Manager. So it will hopefully be picked up by the Google bot and incorporate it into our results. There’s never a guarantee for this happening, but we can make this data available and hope for the best. So let’s see how we can do this. First of all, we would need to have a template of the right markup. Google gives us structured data tabs that are available, so they are not only for reviews but also for special data tabs for articles, music, receipts, videos, and more. We are actually not in the Creative Works here, we’re under the eCommerce section, because this is an eCommerce site. Let’s go here to Products, and look at the results that we want to markup. We have here an example for JSON-LD. This will open up our structure data testing tool. And we can see which information ideally would be implemented in such a JSON-LD object. So we have here the product name, the image, the description, the brand, and here the important part of our aggregate rating rating value, rating count, and if you want we can also incorporate offers. Now on our demo shop here we don’t have an offer at the moment, and we don’t have all the information available, so let’s cut this down a little bit. And you can do this really easily in this editor. And every time we make a change we can validate it and see if there are any errors or warnings where we removed any kind of information that we shouldn’t have removed for it to work correctly. I’ll also take out this brand information and product ID. Description, the image, all we really need is the name and the aggregated rating. Let’s try to check that again. So we have a product name and the rating. So that should do it. Let’s copy this and put it into our Google Tag Manager account. Click on new tag. This will be a customer HTML tag. And we simply input our text here. Let’s mark this up correctly. This is a JSON-LD markup tag for the product pages. We continue here. And we build a trigger, which only files on product pages. Which we can define by the URL so if there’s product in the title this should work. And we create out tag. Go into the preview and debug mode. And go back to our page and reload this as well. And our JSON-LD for product pages was deployed correctly. Now unfortunately we won’t be able to test this with our structured data testing tool because this only works for open websites and right now this website is still in preview and debug mode so the tag actually hasn’t been deployed yet. We can change this by publishing a version. Now let’s try this in our testing tool. Now fortunately we can see here that there is already some markup in the page. Our shop system will comerse this pretty well. The information we have inputted here is in the second tab and we see the name has been transferred, the type, and our rating value and review count. Now obviously this wouldn’t make much sense to deploy on every product page, because every product page is different. We have a different name. We have different reviews, and we have different kind of ratings. But with Google Tag Manager we can actually deploy this dynamically with the help of variables. So how would we do this? Let’s go back in our JSON-LD object here and look at these things that we want to replace dynamically. First of all we would have here the name that should be changed dynamically based on the name in our eCommerce store. And we have covered a lot of ways on how to do this is previous videos. The safest way and the intended way of Google Tag Manager and doing this is the actual data layer. So I’ve implemented a data layer here. We can look into the data layer in our messages and see what data we have available already in the data layer and use that for our tags. So for example here, in this data layer you already have the name available and other information about this product. Now all we need to do is build a data layer variable and pull out the name of this product. I already went ahead and did this. So on the variables I’ve built a data layer variable for the product name. We dig into the eCommerce object, detailed product name, the first name that comes up. Then pull it into this variable. Now on other products that have reviews I have installed additional information and pushed this through the data layer, such as the review information. So we can again check what is the data layer for this product and we see there’s an event called product view and the score and the reviews are submitted as well. So that’s the information that I put into additional variables to pull out from the data layer. Now we can use these data layer variables, number of previews, product name, review score to dynamically replace these values in our JSON-LD tag. So let’s try this out. Let’s go over to tags. And instead of the product name, we’ll implement our variable and we can do this with curly brackets and putting in the variable name. Same would be the case with our rating value here, and our review count. Notice that these should model whatever you have named your variables in Google Tag Manager. So that should do it, we can now go ahead and save this tag. Let’s refresh here and refresh our page. We now see our JSON-LD being deployed on this website. Once we click into it we can see how our custom HTML tag got filled. We have now that name Happy Ninja. We have the rating value and the number of ratings right here. So this is now dynamic so if you got to another website or another product, Let’s choose this one. We see our JSON-LD product and we see it was filled out with different information here. This is now dynamically filled through the data layer and our data layer variables. So again we could go ahead and publish this, and test it our with our structured data testing tool right here. Run a test. And we see we have a new product here which now has a different name and our rating value and review count was ported over. So this was a quick example o

SHOW MORE...

23
Leave a Comment

avatar
 
smilegrinwinkmrgreenneutraltwistedarrowshockunamusedcooleviloopsrazzrollcryeeklolmadsadexclamationquestionideahmmbegwhewchucklesillyenvyshutmouth
9 Comment threads
14 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
13 Comment authors
Chris BrissonDanielMaggieJulianDaniel Recent comment authors
newest oldest most voted
Udi Sabach
Guest
Udi Sabach

Hi. This is very helpful. Question, is it possible to dynamically populate JSON-LD with values without using the DataLayer? I have 30-40 local business pages (on a single site). thank you!

Julian
Guest

yes, but technically the JSON-LD data needs to be outputted during the site load, which makes other techniques such as scraping hard. So ideally the data would be “ready” before GTM initiates, so you can fire it on the Pageview event. It would be possible e.g. with a Lookup Table Variable

Nathan Brunetti
Guest
Nathan Brunetti

Can you provide the video that you did that explains how you pushed ecommerce data to the data layer so you could you it as dynamic values? You talking about it at 7:46 in your video above.

Julian
Guest
Daniel
Guest
Daniel

But if I don’t have WP? I need to push data to the data layer first, create variables and then create the JSON-LD tag?

How do I do the pushing dynamically so I don’t have to write it for every product page?

Thank you

Julian
Guest

this would be a job for your backend developer to implement it according to the dataLayer documentation https://developers.google.com/tag-manager/devguide – Some CMS (like wordpress) have Plugins. There are also plugins for Magento, Prestashop, Joomla etc. available.

Ewerton Jacubowski Pereira
Guest
Ewerton Jacubowski Pereira

Thanks Julian ! You’re too good to share it … I’m from Brazil , my country is going through a crisis , living in a country town where the professional expectations are becoming smaller … But apprehending you can think of better days for the future! Hugs..

Julian
Guest

thanks. Glad this is helpful

Nathan Brunetti
Guest
Nathan Brunetti

Can you provide the video that you did that explains how you pushed ecommerce data to the data layer so you could you it as dynamic values? You talking about it at 7:46 in your video above.

Julian
Guest
Daniel
Guest
Daniel

But if I don’t have WP? I need to push data to the data layer first, create variables and then create the JSON-LD tag?

How do I do the pushing dynamically so I don’t have to write it for every product page?

Thank you

Daniel
Guest
Daniel
Julian
Guest

this would be a job for your backend developer to implement it according to the dataLayer documentation https://developers.google.com/tag-manager/devguide – Some CMS (like wordpress) have Plugins. There are also plugins for Magento, Prestashop, Joomla etc. available.

Carl Taylor
Guest
Carl Taylor

Could you direct me to the resource on creating the “message” data layer. Cheers

Julian
Guest

this would be a dataLayer push. We talk about how to do this in our Essentials Training, but Google also has an official documentation here https://developers.google.com/tag-manager/devguide

Carl Taylor
Guest
Carl Taylor

Could you direct me to the resource on creating the “message” data layer. Cheers

Julian
Guest

this would be a dataLayer push. We talk about how to do this in our Essentials Training, but Google also has an official documentation here https://developers.google.com/tag-manager/devguide

Maggie
Guest
Chris Brisson
Guest

perfect!

Julian
Guest

thanks

Chris Brisson
Guest

perfect!

Julian
Guest

thanks

Chris Brisson
Guest

perfect!