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
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.
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 on how you can implement metadata to your pages with the help of Google Tag Manager. There is obviously much more to it than just our short example here. There are many more JSON-LD examples for reviews, for receipts, for music, for articles to markup your pages if that is applicable to your case. Now if you’re interested in building this into your website with the help of Google Tag Manager we have a little template for you, which you can use on the measureschool.com/jsonld. Where you find a container that you can upload to your Google Tag Manager account. Which will give you all the different templates that you might want to use for deployment of JSON-LD on your website. So check it out at measureschool.com/jsonld. (upbeat music) And that’s already it with this weeks video of measureschool.com. If you like this video, please subscribe to this channel and don’t forget that you can get our JSON-LD templates at measureschool.com/jsonld. My name is Julian, til next time.