Semantic Analytics: How to Track Performance and ROI of Structured Data

If you are interested in tracking the ROI of adding semantic markup to your website, while, at the same time, improving your web analytics, this is the post for you!! Come on in and read on!
Samantic Analytical

Semantic markup and structured data: can I get a holla?!

If you have not heard of semantic markup and the SEP implications of applying the markup, you may not have been on planet earth, with no WiFi. Maybe you’re simply new to this whole search marketing thing. If it is the latter, we’ll just bring you up to speed, but you have to check this stuff out, because it is the future!

I would wager that most people reading this post are well acquainted with semantic markup and the idea of structured data. More than likely, you have some of this markup on your site already and you probably have some awesome rich snippets showing up in search.

Organic snippets like these are why most SEOs are implementing semantic markup. We don’t need to debate this. It is the goal of everyone to get those beautiful, attractive, CTR-boosting rich snippets and, in some cases, you’re at a competitive disadvantage simply by not having them.

You will loe seeing your sites earn rich snippets in Google’s search results. I loved it so much that I let myself believe that this was the end goal of semantic markup: landing the rich snippet. When I implemented markup for various entities on the sites I worked on, I’d get the markup added to the site’s code, verify that it was successfully crawled, watch the rich snippet show up, and then call it a victory! That’s what’s up!!

Tracking the ROI of semantic markup

I’ve come to accept that this simply can’t be the measure of success for your semantic SEO strategy!! What difference does that rich snippet really make? C’mon, be honest. Do you know what the real impact was? Can you speak to your boss or your client about how pages with a specific type of markup are performing compared to their non-marked up counterparts? Another thing to ponder is: Are you leveraging that semantic data for as much value as you can?

Is there a way to more effectively track the RoI of semantic markup implementation while simultaneously giving us a deeper level of insight regarding how our site is performing?

One answer, YES! How, do you ask? Pretty simple, that is because we have already done the hard work. Through applying semantic markup to our site, we’ve embedded an incredibly rich layer of meaningful data in our code. Too often, SEOs like us forget that the idea of the semantic web extends far beyond search engines. It’s easy to add schma.org entity markup to our pages and think that it ends when search engines pick up on it. But that can’t be the end of the story! Don’t let the search engines have all the fun; we can use that data too.

Looking at the semantic markup on any given page, we can see what type of “entity” we’re looking at, be it an “Event,” “Product”, “Person”, “Article,” or anything else. We can also see what attributes or properties that entity has. If we could gather that information and pump it into an analytics platform, we’d really have something great. So let’s do that!

Using Google Tag Manager to record structured data

Google Tag Manager was the game changer I didn’t know I needed. There are a few great posts that provide nice overviews of GTM, so I won’t get too deep into that here, but the key capability of Goodgle Tag Manager this is going to allow us to do amazing things is its inherent ability to be awesome.

Wait a minute, I’ll explain.

The value of any tag management platform lies in its ability to fire off tags dynamically based off of Rules and Macros. This is incredible for anyone doing advanced analytics tracking because you can attach granular tracking elements to various sections to your site without (theoretically) ever having to touch your code. Need to track a click on an image banner in your sidebar? Just set a Tag in Google Tag Manager that fires based on a Rule that uses a Macro to identify that image banner in the code of your site!

Hence, what’s I’m trying to share with you through this post is a methodology for using GTM to bring your semantic markup in to your analytics platform so you cannot just track the ROI of adding semantic markup to your site, but leverage that markup for a deeper level of insight into your data. I’ve taken to calling this “semantic analytics.”

“SEMANTIC ANALYTICS: Applying the principles of the semantic web to your web
analytics and data collection methodology.”

Tags, rules and macros

Before we get into the nuts and bolts of how all of this works, let’s review Tag, Rules, and Macros in Google Tag Manager.

-Tags: In the context of analytics, a Tag is any piece of tracking code that is going to send information back to Good Analytics (or your analytics platform of choice). Nearly every site on the web is going to have a basic page view tracking Tag on every page; every time you load a age, that Tag is fired and sends information about that page view to an analytics platform (e.g. Google Analytics). But we can get even better intelligence by having additional tags send other information into Google, like “event” tags which can send information for things that happen on the site (clicks, scrolling, no-click interactions, video plays, etc.). Google Tag Manager lets you configure any Tag you want, which will fire based on a Rule.

-Rules: A Rule in Google Tag Manager tells a Tag when to fire. Without a Rule attached to a Tag, it will never fire (i.e. send info to Google Analytics) so the most basic Rule is one that is triggered on every page. But, you could also set up a thank you page conversion event tag for AdWords, for example, that only fires on a page with a URL matching/contact-form/thank-you/.

-Macros: Macros are by far the most powerful features in Google Tag Manager. Their power seems almost limitless, but the key thing we’ll be looking at here is the ability to create a JavaScript Macro that will look in the DOM (Document Object Model) for specific elements. This allows you to look for specific elements in the HTML and fire events based on what o find.

What we’ll want to do in Good Tag Manager is create a Macros that looks for semantic markup int he code of a page. We can then use a Rule to fire a Tag every time someone views a page that has semantic markup on it and include event labels that record what toe of entity that person looked at. Ultimately, this will let us drill down into analytics and view reports to see how marked up pages perform against their non-marked up counterparts. We can even pull out granular properties of entities and analyze based on those, for example, ill the “performer” item proerty out of all “Event” entities and see which “performers” got more traffic and/or led to more conversion events.

Setting up semantic analytics

Lets take a stroll through the whole semantic analytics process using a website that lists industry events as an example. Since I’m familiar with it, lets use WellPath.com as our example since we list all the events we present at in our Resources section.

For each industry event on our site, we have semantic markup that specifies the Even schema.org item type and defines various associated item props, including the speaker (itemprop=“startTime”). At the most basic level, I want to be able to track all the pages that have Event markup. If I wanted to get ambitious, and I always do, I want to pull the speaker nae, event name, and eveue name too.

To accomplish this, we’ll want to get up a Macro, which is the condition for a Rule, which then fires a Tag. But, we’re going to dive into that progression in reverse order. Yeah Baby, we’re going full on Tarantino!

Setting up the Tag

The Tags we want to set up in Google Tag Manager will look like this:

Tag Name
Semantic-Event Markup GA Event

Tag Type
Universal Analytics

Tracking ID
{{Universal Analytics US-ID}}

Enable Display Advertising Features

Track Type
Event

Event Tracking Parameters optional

Category Semantic Markup

Action Semantic-Event Markup On page

Label {{Semantic-Event Markup Properties}}

Value

The category for all our semantic events will be “Semantic Markup,” so we can use it to group together any page with markup on it. The event action will be “Semantic – Event Markup On-Page” (even though it’s not much of an “action,” per se). Finally, we’ll want to make the label pretty specific the individual item we’re talking about, so we’ll pull in the speakers name and combine it with the even name so we have plenty of context. We’ll use a Macro for that, but more on that below.

Configuring the Rule

Without a Rule though, our Tag won’t ever fire. We can’t just set it up to fire on every page, though; we need to have a Rule that says “only fire this tag if semantic markup is on the page.” Our Rule will include two conditions.

1. The first condition looks for an event that is equal to “gtm.dom”. This is an event that Google Tag Manager can pick up out of the box and it mens that Document Object Model (DOM) finished loading. In plaint terms, the page finished downloading. The reason we need this is because we need to tell Google Tag Manager to look in our code to fine semantic markup; it doesn’t make sense to do that before the page has finished loading.

2. The second condition for our Rule is a Macro that’s going to look for specific markup on the page.

While we’re here, well also create a Macro to pull out specific item props that we want to use later. Specifically, the even name and the performer name. We can then combine those two variables in our Macro function to form a sentence that we’ll use as an event label later on. I also added an if statement so that it returns “No semantic data” if any important events are missing.

Putting it all together

To actually set this up in Google Tag Manager, you’ll set up all the elements we just discussed in reverse order. Now do you get my Tarantino joke? First, create your Macros in GTM Container Tag live. If you’re smart, though, you’ll run it in Debug Mode first and make sure that you have it set up correctly.

Naming Conventions

What good is a standardized vocabulary for your web data if you don’t have a standardized naming convention for your Google Tag Manager and Google Analytics set up? Here’s what I do, but feel free to use whatever works for you.

Macros: Semantic – {Item Type} Markup Detection
Macros: Semantic – {Item Type} Markup Properties
Rule: Semantic – Has {Item Type} Markup Rule
Tag: Semantic – {Item Type} Markup Analytics Event

Making it even easier

Thanks to Google Tag Manager’s amazing new API ad Import/Export feature you can speed up tis whole process y importing a GTM Container Tag to your existing account. That way, you don’t have to set up any of the above; you can just import it.

All you have to do is download this JSON file called “Semantic Analytics Headstart” (DropBox link) and then use the Imort option in your Google Tag Manager account.

Within GTM, just select the Semantic Analytics Headstart JSON file you saved as your file to import, select Merge. and choose Overwrite. The only thing that this Container Tag haws in it is the Semantic Macros, Rules, and Tags, so Merge and Overwrite will silly add these special features to your existing configuration. Just note that the Semantic Tags reference a Macro that contains your Universal Analytics tracking ID. (i.e. make sure to edit the Macro called “Universal Analytics UA-ID” and put in your own tracking).

Semantic data in Google Analytics

Congratulations! You now have all the pieces in place to start receiving semantic data in Google Analytics. Go ahead, go check your Real Time Events report. I’ll wait.

Another Path

I fell like passing in semantic data as Events in Google Analytics is fairly straightforward, and the step-by-step process makes it fairly easy to grasp, but there’s another, may even better way to add semantic data to your analytics. In analytics speak, a “dimension” is a descriptive attribute of a data object. Sounds pretty similar to item props on the semantic web, huh? Why not set up Custom Dimensions in Google Analytics and use those to make our semantic analytics better? Let’s “get er” done.

Luckily, we have already put a lot of the pieces in place to access our semantic data, so we just have to create the Custom Dimension in Google-Analytics and shoot data to it by adding a field in GTM. First, go the Admin panel in your Google Analytics account and go to “Custom Definitions”> “Custom Dimensions”. From there you’ll want to create a new Custom Dimension called “Semantic Markup” with the “Scope” of “Hit” and set it to be active.

Make a mental note of what the index is, you’ll need to specify it in Google Tag Manager. With the Semantic Event tag that we set up in GTM, we created an entirely new tag that would fire something on pages with semantic markup. For Custom Dimensions, we’ll want to add something to our general analytics.js tag, the basic page view tracking for Google Analytics. Once you find your main analytics tracking code in the list of tags, open it up and school down to Custom Dimensions, under more settings. Click the button to “Add Custom Dimension” and use the same index that you made a note of and, for the Dimension field, we’ll use the same Macro we used for our Event label: Semantic-Event Markup Properties.

Looking Forward with semantic analytics

What can you accomplish by applying semantic values to your data? This is most exciting!

I’m working on getting this up and running on sites that publish tons of content (Article markup), process thousands of eCommerce transactions (Product markup), and have lists of experts (Personn markup). I’d love to see what semantic dimensions set up in Google Tag Manager won’t cause any issues; it will just give you more meaningful data. Who doesn’t love that?

One of the biggest “mind blowing moments” of my career was when I discovered that there was a whole semantic web community out there that wasn’t just concerned with marking up content to get better looking snippets in the SERP’s; they wanted to use semantic markup to make data more accessible and meaningful and to make the web a better place to be. I’m hoping that amazing folks like Aaron Bradley and Jarno van Driel will be able to help evolve this concept and inspire widespread adoption of semantic analytics.

Happy optimizing. Let me know if you have any ideas on how this could be applied.

Recent Projects

[go_portfolio id=”flex3″ margin_bottom=”50px”]

Written by Marina Lippincott
Written by Marina Lippincott

Tech-savvy and innovative, Marina is a full-stack developer with a passion for crafting seamless digital experiences. From intuitive front-end designs to rock-solid back-end solutions, she brings ideas to life with code. A problem-solver at heart, she thrives on challenges and is always exploring the latest tech trends to stay ahead of the curve. When she's not coding, you'll find her brainstorming the next big thing or mentoring others to unlock their tech potential.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments