Google Tag Manager: an introduction

Perhaps you’ve heard about it: Google Tag Manager. Google introduced this tool 5 years ago, a tool that would make marketers less dependent on developers and that would, therefore, speed up your marketing process. Google Tag Manager has evolved over the years becoming a more complete and easy to use tool. Here I want to explain why you should sign up today, if you aren’t using Google Tag Manager already. 

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 199 - Buy now » Info

Before I go on to introduce Tag Manager, I do want to say a word of warning. Tag Manager is a powerful tool, and like any power tool, it should be used with care. Don’t just add tags that look appealing to you but you don’t fully understand. For instance, you might bring in a tag that could harm your site because the code is not safe. Or use a tag that influences your data tracking. If you’re not sure or in doubt of a certain tag, have someone who knows JavaScript take a look at it. Luckily, Tag Manager has a great Preview and Debug mode that lets you validate code before you publish.

What is Google Tag Manager?

If you have closer look at the term Google Tag Manager, you can guess what it’s about. It’s a tool developed by Google to manage your tags. But then the next question arises: what’s a tag? A tag is a snippet of code. There’s a whole bunch of analytics and marketing tools out there that work with JavaScript code. For instance, the Google Analytics tracking code – the one you add to your site to track your site’s traffic with Google Analytics – is JavaScript code.

Did you ever had to wait for a developer to add a piece of JavaScript to your site? Or to test whether that code wasn’t harming your website? Then you know how much valuable time that can take. With Google Tag Manager you can add these pieces of JavaScript or tags yourself. Google Tag Manager even has the ability to test whether you’ve implemented the tag correctly.

Running every tag from Google Tag Manager has two big advantages. First of all, you’ll have an overview of the tags you’ve added. Secondly, you’re in full control of measuring the effects of your marketing efforts.

What can you use it for?

Because Google Tag Manager allows you to add JavaScript to your site, you can use it for a lot of things. You can use it to get more insight in the behaviour of visitors on your site – ‘events’ like clicking on a button – but also to get tags of third party tools on your site. It will even help you to add structured data to your pages!

Google Analytics and Tag Manager

One of the most used tags that’s managed in Google Tag Manager is the Google Analytics tag. Not only can you add the Google Analytics tracking code. You can use Google Tag Manager to create, for instance, custom dimensions, events or content grouping. This means that you can track if people click on your buttons, if they scroll down to a certain point on your page, if they watch your videos and so on. All the cool things you can do with Google Analytics events, can now be managed in Google Tag Manager. And you won’t need a developer for it!

Other third party tools

Google Tag Manager supports a lot of third party tags, like: Adwords, Adobe Analytics, Bing ads, Hotjar, Crazyegg and so on. You can find the complete list on the Google Google Tag Manager support forum. You can use Hotjar tags to finally get those heatmaps – a visual representation of where people click on your site – you wanted to have. Or run surveys and A/B tests on your site. Getting data like that can help you bring your conversion rate to the next level.

Google Tag Manager and structured data

But there’s more! You can also use Google Tag Manager to implement structured data on your site. Structured data is extra information you add to your page in a specific format. Google can show this information in the search results, which makes it more likely people click on your result and engage with your page.

At the moment, we’re working on a new and practical course about structured data. In this course, you’ll learn how structured data works and how to implement it with Google Tag Manager yourself. Don’t miss the launch and keep an eye on our newsletter!

Where to find Google Tag Manager?

Google is ubiquitous with its tools. If you visit:  you can see all tools Google has developed to help you with your marketing strategy. In addition to Google Analytics, there are tools to help you boost conversion or perform customer surveys. And, of course, there’s Google Tag Manager. You can sign up for free! Wait! Free, you say? Yes, free!! So what’s stopping you?

After you’ve signed up, you can create an account for your website, your iOS or Android app or your AMP pages:

Create a container in Google Tag Manager

Just provide the URL of your site as the container name and then select web – if you want to implement it on your website. After you’ve created this container, Google Tag Manager will ask you to add a piece of code in the <head> and <body> of the page. I promise, this is one of the few things you might need a developer for, when it comes to using Google Tag Manager.

install Google Tag manager on your site

Luckily, if you’re using WordPress, you can easily add the Google Tag Manager code using a plugin called DuracellTomi’s Google Tag Manager for WordPress. Please note that you only have to use the GTM-XXXX code.

If you’re using another CMS, please check out the quick install guide for more information on how to get started.

After you’ve inserted the Google Tag Manager code to your pages, you’re ready to create your own tags. This can be done in a so called workspace that looks like this:

So now you’re all set up and ready to add those tags to your site.

And now?

We’ll be doing more posts on Google Tag Manager soon. Explaining the practical side of things like how to create variables, triggers and tags, and how to implement structured data with it. We’ll also help you understand how to combine Google Tag Manager with Google Analytics to use it to its full extent. So stay tuned!

Read more: ‘How to use Custom Dimensions in Google Analytics’ »

Social buttons: How to add and track them on your site

To help your blog gain more readers, you can make use of social buttons which allow your current readers to share interesting posts on their social media accounts. But how should you go about implementing them? In this post we’ll explain how we’ve done this at Yoast and will give you some pointers on how to get started.

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

What are social buttons?

For those who don’t know what social buttons are: They’re the buttons that you’ve seen around the internet that are usually placed somewhere below a blog post that allow readers to share articles on various social media platforms. This is great for gaining extra exposure and thus also getting more traffic to your website.

At Yoast, our social buttons look as follow:

Social Buttons

How did you implement these social buttons in WordPress?

Now you might be wondering about how these buttons were implemented. Your initial thought might be that this was added with some kind of plugin. However, at Yoast we decided to add it to our theme. This gives us extra control in how we style and display things. Of course we could have decided to add these buttons to a plugin, but the added benefit would be minimal for us.

We’ve decided to place the code for the social buttons in a template partial. This way we can easily embed it throughout the website without having to drastically edit template files or having to embed the buttons manually per post.

Here’s a basic example of how we implemented a social button for Facebook. Note that not all the code is actual production code and has been replaced with psuedo-code to make implementation easier to understand.

// File: <theme_folder>/html_includes/partials/social-share.php
function facebook_social_button() {
$article_url = get_article_url(); // Psuedo-code method to retrieve the article's URL.
$article_url .= '#utm_source=facebook&utm_medium=social&utm_campaign=social_buttons';

$title = html_entity_decode( get_og_title() ); // Psuedo-code method to retrieve the og_title.
$description = html_entity_decode( get_og_description() ); // Psuedo-code method to retrieve the og_description.
$og_image = get_og_image(); // Psuedo-code method to retrieve the og_image assigned to a post.

$images   = $og_image->get_images();
$url = '';
$url .= '&p[url]=' . urlencode( $article_url );
$url .= '&p[title]=' . urlencode( $title );
$url .= '&p[images][0]=' . urlencode( $images[0] );
$url .= '&p[summary]=' . urlencode( $description );
$url .= '&u=' . urlencode( $article_url );
$url .= '&t=' . urlencode( $title );
echo esc_attr( $url );
<div id="social-share">
<div class="socialbox">
<a rel="nofollow" target="_blank" data-name="facebook" aria-label="Share on Facebook" data-action="share" href="<?php facebook_social_button(); ?>">
<i class="fa fa-facebook-square text-icon--facebook"></i>

The above code could be used in a similar fashion for other social media platforms, but it can vary greatly in terms of URL structure. We advise you look at the documentation of your desired platforms to ensure compatibility.

To include these social buttons in your blog posts, open up single.php in your theme’s folder and paste the following snippet where you want the buttons to appear:

<?php get_template_part( 'html_includes/partials/social-share' ); ?>

That’s it! If you don’t want to collect interaction data from these buttons, then this is all you need. If you want interactions to be tracked, then read on.

Tracking Interaction with Social Buttons

Having nicely styled social buttons in your website is one thing, but tracking the actual interactions with them would be even better.
At Yoast, we use JavaScript to ensure the tracking of the social media sharing is done correctly so we can easily see what social media platforms are popular among our readers.

The code for this is relatively simple and depends on the Google Analytics Tracker being properly implemented into your website. Assuming this is the case, the following code will be of great help:

jQuery( document ).ready( function( $ ) {
	$( '.socialbox a' ).click( function( e ) {
		if ( typeof __gaTracker !== "undefined" ) {
			__gaTracker( 'send', 'social', $( this ).data( 'name' ), $( this ).data( 'action' ), document.querySelector( "link[rel='canonical']" ).getAttribute( "href" ) );

Get the most out of Yoast SEO, learn every feature and best practice in our Yoast SEO for WordPress training! »

Yoast SEO for WordPress training$ 99 - Buy now » Info

The above JavaScript snippet passes in some of the extra information we passed along to the anchor tag. This extra information can be identified by the data- prefix and is retrieved by calling $( this ).data( [...] ). This method allows us to easily extend the social-share div and add more buttons.

If you want more information on how Google tracks this information, you can read about it here.


As you can see, it’s not very difficult to add social buttons to your blog. Even tracking them in Google Analytics has become a breeze compared to past implementations.

All that’s left is to go and implement the buttons and allow your readers help promote your posts. Good luck!

Read more: ‘Social media optimization with Yoast SEO’ »

Understanding bounce rate in Google Analytics

“I came, I puked, I left” is a very famous definition of the bounce rate by Avinash Kaushik. But what does it mean exactly? When does a visitor bounce? Is it purely a visitor that hits the back button or is there more to it? And what can you tell by looking at the bounce rate of a webpage? In this post, I want to show you what it is, what it means and how you can improve your bounce rate. 

For good SEO, you need a good user experience. Learn about UX & Conversion! »

UX & Conversion from a holistic SEO perspective$ 19 - Buy now » Info

What’s bounce rate?

Bounce rate is a metric that measures the percentage of people who land on your website, and do completely nothing on the page they entered. So they don’t click on a menu item, a ‘read more’ link, or any other internal links on the page. This means that the Google Analytics server doesn’t receive a trigger from the visitor. A user bounces when there has been no engagement with the landing page and the visit ends with a single-page visit. You can use bounce rate as a metric that indicates the quality of a webpage and/or the “quality” of your audience. By quality of your audience I mean whether the audience fits the purpose of your site.

How does Google Analytics calculate bounce rate?

According to Google bounce rate is calculated in the following way:

Bounce rate is single-page sessions divided by all sessions, or the percentage of all sessions on your site in which users viewed only a single page and triggered only a single request to the Analytics server.

In other words, it collects all sessions where a visitor only visited one page and divides it by all sessions.

Having a high bounce rate can mean three things:
1. The quality of the page is low. There’s nothing inviting to engage with.
2. Your audience doesn’t match the purpose of the page, as they won’t engage with your page.
3. Visitors have found the information that they were looking for.

I’ll get back to the meaning of bounce rate further below.

Bounce rate and SEO

In this post, I’m talking about bounce rate in Google Analytics. There’s been a lot of discussion about whether bounce rate is an SEO ranking factor. I can hardly imagine that Google takes Google Analytics’ data as a ranking factor, because if Google Analytics isn’t implemented correctly, then the data isn’t reliable. Moreover, you can easily manipulate the bounce rate.

Luckily, several Googlers say the same thing: Google doesn’t use Google Analytics’ data in their search algorithm. But, of course, you need to make sure that when people come from a search engine to your site, they don’t bounce back to the search results, since that kind of bouncing probably is a ranking factor. It might be measured in a different way than the bounce rate we see in Google Analytics, though.

From a holistic SEO perspective, you need to optimize every aspect of your site. So, looking closely at your bounce rate can help you optimize your website even further, which contributes to your SEO.

How to interpret bounce rates?

The height of your bounce rate and whether that’s a good or a bad thing, really depends on the purpose of the page. If the purpose of the page is purely to inform, then a high bounce rate isn’t a bad thing per se. Of course, you’d like people to read more articles on your website, subscribe to your newsletter and so on. But when they’ve only visited a page to, for instance, read a post or find an address, then it isn’t surprising that they close the tab after they’re done reading. Mind you, even in this case, there’s no trigger sent to the Google Analytics server, so it’s a bounce.

A clever thing to do, when you own a blog, is creating a segment that only contains ‘New visitors’. If the bounce rate amongst new visitors is high, think about how you could improve their engagement with your site. Because you do want new visitors to engage with your site.

If the purpose of a page is to actively engage with your site, then a high bounce rate is a bad thing. Let’s say you have a page that has one goal: get visitors to subscribe to your newsletter. If that page has a high bounce rate, then you might need to optimize the page itself. By adding a clear call-to-action, a ‘Subscribe to our newsletter’ button, for instance, you could lower that bounce rate.

But there can be other causes for a high bounce rate on a newsletter subscription page. In case you’ve lured visitors in under false pretenses, you shouldn’t be surprised when these visitors don’t engage with your page. They probably expected something else when landing on your subscription page. On the other hand, if you’ve been very clear from the start about what visitors could expect on the subscription page, a low bounce rate could say something about the quality of the visitors – they could be very motivated to get the newsletter – and not necessarily about the quality of the page.

Bounce rate and conversion

If you look at bounce rate from a conversion perspective, then bounce rate can be used as a metric to measure success. For instance, let’s say you’ve changed the design of your page hoping that it will convert better, then make sure to keep an eye on the bounce rate of that page. If you’re seeing an increase in bounces, the change in design you’ve made might have been the wrong change and it could explain the low conversion rate you have.

You could also check the bounce rate of your most popular pages. Which pages have a low and which pages have a high bounce rate? Compare the two, then learn from the pages with low bounce rates.

Another way of looking at your bounce rate, is from a traffic sources perspective. Which traffic sources lead to a high or a low bounce rate? Your newsletter for instance? Or a referral website that sends a lot of traffic? Can you figure out what causes this bounce rate? And if you’re running an AdWords campaign, you should keep an eye on the bounce rate of that traffic source as well.

Be careful with drawing conclusions though…

We’ve seen loads of clients with a bounce rate that was unnaturally low. In that case, all alarm bells should go off, especially if you don’t expect low bounce rates. Because that probably means that Google Analytics isn’t implemented correctly. There are several things that influence bounce rate, because they send a trigger to the Google Analytics server and Google Analytics falsely recognizes it as an engagement. Usually, an unnaturally low bounce rate is caused by an event that triggers the Google Analytics server. Think of pop-ups, auto-play of videos or an event you’ve implemented that fires after 1 second.

Of course, if you’ve created an event that tracks scrolling counts, then having a low bounce rate is a good thing. It shows that people actually scroll down the page and read your content.

How to lower high bounce rates?

The only way of lowering your bounce rate is by amping up the engagement on your page. In my opinion, there are two ways of looking at bounce rate. From a traffic perspective and from a page perspective.

If certain traffic sources have high bounce rates, then you need to look at the expectations of the visitors coming to your site from those sources. Let’s say you’re running an ad on another website, and most people coming to your site via that ad bounce, then you’re not making their wish come true. You’re not living up to their expectations. Review the ad you’re running and see if it matches the page you’re showing. If not, make sure the page is a logical follow-up of the ad or vice versa.

If your page lives up to the expectations of your visitors, and the page still has a high bounce rate, then you have to look at the page itself. How’s the usability of the page? Is there a call-to-action above the fold on the page? Do you have internal links that point to related pages or posts? Do you have a menu that’s easy to use? Does the page invite people to look further on your site? These are all things you need to consider when optimizing your page.

For good SEO, you need a good user experience. Learn about UX & Conversion! »

UX & Conversion from a holistic SEO perspective$ 19 - Buy now » Info

What about exit rate?

The bounce rate is frequently mistaken for the exit rate. Literally, the exit rate is the percentage of pageviews that were the last in the session. It says something about users deciding to end their session on your website on that particular page. Google’s support page gives some clear examples of the exit rates and bounce rates, which make the difference very clear. This comes directly from their page:

Monday: Page B > Page A > Page C > Exit
Tuesday: Page B > Exit
Wednesday: Page A > Page C > Page B > Exit
Thursday: Page C > Exit
Friday: Page B > Page C > Page A > Exit

The % Exit and Bounce Rate calculations are:

Exit Rate:
Page A: 33% (3 sessions included Page A, 1 session exited from Page A)
Page B: 50% (4 sessions included Page B, 2 sessions exited from Page B)
Page C: 50% (4 sessions included Page C, 2 sessions exited from Page C)

Bounce Rate:
Page A: 0% (one session began with Page A, but that was not a single-page session, so it has no Bounce Rate)
Page B: 33% (Bounce Rate is less than Exit Rate, because 3 sessions started with Page B, with one leading to a bounce)
Page C: 100% (one session started with Page C, and it lead to a bounce)


Bounce rate is a metric you can use to analyze your marketing efforts. You can use it to measure if you’re living up to your visitors’ expectations. As we have seen, visitors bouncing from your website don’t necessarily puke before they leave, in spite of what Avinash Kaushik says. Nevertheless, you want them to engage with your site. So you can use the bounce rate to decide which pages need more attention. Meeting your visitors’ expectations and making your pages more inviting for visitors all leads to creating an awesome website. And we all know that awesome websites rank better!

Read more: ‘Creating segments in Google Analytics’ »

Why use segments in Google Analytics?

When talking with customers about Google Analytics, you often hear the same thing: “I’m not really using Google Analytics because I don’t know what I’m looking at. It’s just too much”. And that’s a pity because you can learn a whole lot about your website and your audience with Google Analytics’ data. So, is there a simple way to use Google Analytics without getting lost? There might be, by using segments.

What’s a segment?

In Google Analytics a segment is a way to specify the data you’re seeing in every standard view. Google Analytics just throws it all in there, on one big pile of data. This means that when you’re looking at a standard view in Google Analytics you see: ‘all sessions of all visitors’, you see: total revenue, all pages, average time on page of all users, the landing pages of all visitors.

You might recognize this: You’re in the Acquisition section and you’re all happy, because you’ve created the perfect table. You’ve used the advanced filter option to include the Medium: “Organic” and you’re seeing the data you want to see. Then you think: “I’m curious to see which pages these visitors looked at, let’s take these filters to the next section of Google Analytics.” You hit the Behavior section and Poof! your filter is gone. Oh, the frustration!!!

If you want to know which pages people coming from organic search visit, you need to find another way. A segment helps you to narrow down the aggregated data Google Analytics shows, into data you want to see and need, to answer a specific question you have. You can use that segment throughout the sections, the segment doesn’t get lost when switching between sections. For instance, if we want to know which source customers who bought an eBook came from, we can create a segment of people who bought an eBook. By applying that segment and looking at the Acquisition – Source/Medium section, we can conclude that most of our eBook customers came from a newsletter. Goodbye frustration!

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 179 - Buy now » Info

Why do you need segments?

Without segmentation, all data you see is aggregated. This makes it really hard to draw conclusions. As Avinash Kaushik once said: “All data in aggregate is crap.” And I certainly agree with him. If you want to draw a valid conclusion, you need to specify your data.

For example, you can’t just say that most of your visitors visit your site around noon. Well okay, you can. But what does it mean? This data is so aggregated that you can’t build a strategy on it, it doesn’t provide any insight. Based on this data you might conclude that promoting a new product around noon is the way to go. But what if a large amount of your non-paying visitors visit your site around noon, but your high-potential visitors visit your site in the evening? Then you could’ve made the wrong decision based on non-specific aggregated data. So with a segment, you can zoom in on a specific part of your data. And if you do that right, you can make important business decisions that help your business move forward.

How to create a segment in Google Analytics?

First of all, creating a segment in Google Analytics isn’t dangerous. You can edit your segments, you can delete your segments, but you won’t delete the actual data you have. For me this was an important realization, because it meant that I could just ‘play’ with segments without any consequences.

The first step is thinking about what kind of segment you need. Which question do you want answered? What’s important for your business? And where can you find the data to create that segment? Do you want to segment on demographics of the user? And/or, the behavior of the user? Or, the technology the user uses to visit your website? And so on. Knowing what it’s called what you’re looking for in Google Analytics really helps when creating segments.

The second step is adding the actual segment. You can find the segment section at the top of the page in every view from Audience down to Conversions.

add a segment in Google Analytics

This means that if you’re in Dashboards, Shortcuts, Intelligence Events or Real-Time section, you can’t see the segment section.

System segments

Google Analytics offers ‘fixed’ segments which you can find in the ‘System’ section. A lot of these segments are pretty darn useful. For example, there’s an Organic Traffic segment that groups all visitors that came from an organic search result to your site. Very useful, if you want to know which landing pages these users visit. Another example: There’s a Mobile Traffic segment, that groups users that use a mobile device to visit your site. Very helpful as well, for example to find out if the ‘time on page’ is what it should be, this might say something about the mobile friendliness of your site.

Custom segments

There are more segments to think of than the system segments Google Analytics offers. For instance, you can create a segment that filters out all visitors that spend less than half a minute on your site. Or you can create a segment that focuses on the organic traffic from all visitors from the Netherlands. Or, as mentioned before, create a segment based on the products visitors bought or a certain amount of revenue a visitor yielded.

I found this video on YouTube that explains creating a custom segment pretty well:

For me, a couple of segments are really useful. I have segments for every country that’s important for our business, for every product and for every product page. And I have a segment for every medium like Organic, Newsletter and in our case: plugin traffic.

Compare segments

A nifty feature in Google Analytics is the ability to add more than one segment for the same view of data. This means you can compare different segments. For instance, if you created a segment of visitors that stayed longer than 5 minutes on your website and created a segment of visitors that stayed less than 1 minute on your website, you can compare the two and find out more about the behavior of these two groups and in which aspects these two groups differ.


If you want to know what you’re looking at, when clicking your way through Google Analytics, segmentation is the way to go. If you have questions like, “how do the visitors from California behave on my site?” Or, “what are my newsletter visitors doing on my site?” “How’s my campaign going?” Creating a segment is the easiest way to go. It’s a way to dissect your data and actually know what you’re looking at, when looking at all the different sections in Google Analytics. Say farewell to your Google Analytics frustration!

Read more: ‘Facebook Page Insights explained’ »

A new home for our Google Analytics plugins

Today we’re announcing that our Analytics plugins are getting a new home on One of the “problems” of a quickly growing business is that you have to choose what to focus on. We’ve made that choice: we’ll focus on building best in class SEO products, from plugins to reviews, eBooks and training programs. We’re very happy to be able to get our loyal Google Analytics for WordPress users a good new home at Monster Insights.

Google Analytics by Yoast becomes Monster Insights

Meet the new owner(s)

syed-balkhi-300x300The team is managed by Syed Balkhi. You might know Syed from plugins like OptinMonster, Envira Gallery and more. Syed also runs, and is a fantastic entrepreneur. His businesses focus on conversion and business growth, which made our suite of Google Analytics plugins a nice fit.

What does this acquisition mean for existing users?

As Syed says in his post too: aside from new ownership and the new name, it’s business as usual. You can continue to use the plugin that you love without any interruptions.

MonsterInsights logo

The new name and logo for Monster Insights

With the experience Syed and team have, they’ll be adding new features and improvements to what’s now called MonsterInsights in the near future. They’ll update the plugin and give it the love it deserves. I have no doubt in my mind that this will lead to a far better plugin, very quickly.

A nostalgic moment

While I’m very happy about the decision to give this plugin a new home, I’m also feeling nostalgic. Google Analytics for WordPress was my first “major” plugin, even before WordPress SEO (now Yoast SEO) was a thing. It’s been “with me” for a very long time, but I trust Syed and team will take it to even greater heights.

I want to thank Syed for making this tough decision easier. Knowing that he’ll take care of the plugin and both our free and premium customers really made it easier to decide to do what’s right.

If you have questions, pose them in the comments and we’ll try to address them. Also, go ahead over to the new MonsterInsights site and read Syed’s welcome post.

WordPress & AMP: part II

My previous post about AMP lead to a ton of questions and rightfully so. We’ve been testing, developing and working hard in general on understanding what needs to be done to get AMP working without too many errors. This post is an update on where we stand right now, introduces an updated Yoast SEO AMP Glue plugin with new features and gives some more background on the why and what of it all.

The need for multiple plugins

The base AMP functionality is provided by the WordPress AMP plugin. In my previous post I recommended Pagefrog to add styling and tracking to your AMP pages. While it is a nice plugin, it caused more issues for us than it solved. The plugin adds a preview on every post edit screen. This preview is unneeded and there is no way to disable it, and it literally caused browser crashes in our backend.

The issues we had with Pagefrog made me decide to put in some time and created a set of design settings in our Yoast SEO AMP Glue plugin. When you update to version 0.3 of that plugin, you can safely disable Pagefrog and configure the styling on the SEO → AMP design settings tab:

Extra styling options

The Yoast SEO AMP Glue plugin also lets you put in manual CSS and some extra tags in the head section. This allows us, for instance, to have our preferred weight of our Open Sans font available and make the styling fit our brand a bit more.

You can also enable AMP for custom post types on the post types tab. The only post type that doesn’t work yet is pages, as support for that is being added to the main AMP plugin.

WordPress AMP design settings

Errors & testing AMP

We were getting quite a few errors in our Google Search Console AMP report for You can see our indexation and error graph here:


AMP debug mode

You can put any AMP URL into “debug mode” by adding #development=1 to the end of the AMP URL. If you then look in your browsers console – you might have to reload the page – you’ll see the AMP validation warnings. These are the exact same warnings that Google shows in Google Search Console. There are quite a few different types of errors and the Google search console report groups them for you.

I realize the error line in the graph above is not exactly convincing of our quality yet. The drop in errors we saw made clear that we were doing some things right. Now we have about a thousand posts on this blog, and almost a hundred on our development blog. So it’s clear that not all of our content is indexed as AMP yet, and not all of our AMP content is working nicely.

Missing featured images

The biggest source of our issues were article errors. This was caused by one simple issue: a lot of our posts, especially the older ones, didn’t have a featured image. The WordPress AMP plugin then simply outputs JSON+LD tags without that image, causing those errors. The fix is simple: we now have a “default image” field in the design tab of our Yoast SEO AMP Glue plugins settings. It’s used when a post has no featured image. This solved half of our errors.

Testing errors

To test whether you will be getting errors, run your AMP URLs through the Google Structured Data Testing Tool. The output from that tool tells you which data is missing.

Missing site logo

The JSON+LD output also requires a site logo. While this is not an error we ourselves had, many reported this issue. The AMP plugin uses the logo set as your site icon in the Customizer, and omits it if you don’t have one set. We now let you upload a logo on the design tab of the Yoast SEO AMP Glue plugin too, if you want to use a different one.

Retrofitting AMP onto existing content

Part of what we’re doing with the AMP WordPress plugin and the Yoast SEO AMP glue plugin is “fixing” content that exists in your database to work with AMP. The posts on your site are stored as HTML in your database. The HTML of those posts does not necessarily to conform to what AMP HTML requires. For this purpose, the AMP plugin has a set of so called “sanitizers”. These are filters, run over your content, that remove tags and attributes on tags that aren’t allowed. They even remove some attributes when their values aren’t allowed.

We’ve added an extra sanitizer class in our own plugin to remove some more invalid attributes. Once we’re certain that these work, we’ll actually contribute these changes “upstream” to the AMP plugin. These changes have fixed the remainder of the issues we had.

Analytics integration

The only thing we lacked after Pagefrog was removed is tracking. Pagefrog took care of Google Analytics tracking for us. Luckily, adding tracking to AMP pages isn’t hard, so we coded a simple connection to our Google Analytics by Yoast plugin. If you have that enabled and configured, the plugin will automatically grab the account code from it and enable tracking for your AMP pages. You can, however, also choose to use a custom tracking code. If you do this, the plugin no longer integrates with Google Analytics by Yoast.

Facebook Instant Articles

Another thing Pagefrog takes care of is Facebook Instant Articles. There’s now a plugin from Automattic for that purpose, which we’re working on integrating Yoast SEO with. So you won’t need Pagefrog for Facebook Instant Articles either.


With all these changes, getting AMP to work on a WordPress site running Yoast SEO has become slightly easier and lots less error prone. We’ve updated our Setting up WordPress for AMP post with these changes. Good luck and do let us know of errors in the comments!

Google Analytics by Yoast: Free vs Premium

GA free vs premiumWe have two versions of our Google Analytics by Yoast plugin: a free and a premium version. We’ve had some questions about the difference between the two. And while we can mention the additional features the premium version offers, this doesn’t explain how those premium features could benefit you.

So in this post I’ll explain the difference between the free and the premium version of our Google Analytics plugin.


Let me first tell you what the difference in features between the free and premium Google Analytics by Yoast plugin is:

Free Premium
Adds tracking code vinkje x2 vinkje x2
Tracking of 404 and search result pages vinkje x2 vinkje x2
Dashboards vinkje x2 vinkje x2
Specific reports vinkje x2 vinkje x2
Custom dimensions vinkje x2
Adsense tracking vinkje x2
24/7 support vinkje x2

You see that Google Analytics by Yoast Premium comes with some extra features compared to the free version. Let me explain what each of these features does.

Adds tracking code

This is really as simple as that: our Google Analytics plugin adds the Google Analytics tracking code, enabling you to start tracking the traffic on your site. This tracking code is also automatically altered when you check certain options within our plugin. So you won’t ever have to look at that tracking code!

Available for: free and premium

Tracking of 404 and search result pages

After you’ve installed our Google Analytics by Yoast plugin, within Google Analytics you’ll be able to find 404 pages that people have visited on your site. Also, if you have a search functionality on your site and you’ve enabled your site search, you’ll be able to see what people have searched for.

Available for: free and premium


This is a relatively new feature. It enables you to see the sessions to your website of the last month, and your site’s bounce rate for the last month. Just to give you an idea, the sessions graph looks like this:

Yoast Google Analytics Dashboard ‹ Yoast — WordPress

This will give you the ability to get a general overview of how your site’s doing, directly from your WordPress install. You won’t have to go to Google Analytics anymore to see what’s going on.

Available for: free and premium

Specific reports

Next to the dashboards, there are also specific reports that you can take a look at without ever going to Google Analytics. You can see your most important traffic sources, your site’s most popular pages, and countries that get you the most traffic from, all ordered by sessions:


Available for: free and premium

Custom dimensions

Custom dimensions are quite a powerful tool, but also require a pretty lengthy explanation. I’ve written a post about custom dimensions and what you can do with them. We now support 8 different custom dimensions:

  1. Logged In
  2. Post type
  3. Author
  4. Category
  5. Published at
  6. SEO Score (only when combined with our Yoast SEO plugin)
  7. Focus Keyword (only when combined with our Yoast SEO plugin)
  8. Tags

Let me take the custom dimension “Author” as an example to explain what it can do. It shows you how much traffic each specific author has generated over the period of time you select. Especially when you have multiple authors it comes in handy to see which one gets you the most traffic.

These custom dimensions can be viewed in Google Analytics, but also within your WordPress install:


Available for: premium

Adsense tracking

To be able to see Adsense reports within your Google Analytics, you need to add a specific tracking code to your site. If you have Google Analytics by Yoast Premium, you can do this by checking a box. If you’re a regular user of Google Adsense, this is something you’ll want (and need).

Available for: premium

24/7 support

Alongside those premium features, the premium version of Google Analytics by Yoast will also give you access to our 24/7 support team. If you have any trouble with your plugin or need help installing it, or anything like that, our support team is always ready to help you out!

Available for: premium


Both our free and our premium Google Analytics plugins offer you great tracking and easily accessible insights. If you want to get the most out of your tracking and make money from your website, our premium version is the one for you. If you’re looking for more basic tracking features, the free version will probably be enough.

What about you? What do you use our Google Analytics plugin for? Let me know in the comments!

This post first appeared as Google Analytics by Yoast: Free vs Premium on Yoast. Whoopity Doo!

Cohort Analysis in Google Analytics

Cohort Analysis in Google AnalyticsSince a few weeks Google Analytics has been rolling out a new feature in beta: Cohort Analysis. I was actually made aware of this new feature by my colleague Peter, who is working on our Google Analytics by Yoast Premium plugin. We started looking at the new analysis together. As is often the case with Google Analytics, it wasn’t really clear right away. So that’s why I thought I’d delve into it a bit more and try to explain what this actually does for all of you!

What’s a cohort?

Before I can decently explain what Google Analytics’ cohort analysis is about, it’s probably a smart idea to explain what a cohort is. When asking Google what the meaning of ‘cohort’ is, it gives me this explanation:

cohort meaning Google Search - cohort analysis google analytics

In this case, the second definition is obviously the one we’re looking for. A cohort is any group of people sharing a characteristic. In Google Analytics’ case, the only characteristic to be shared you can select, at the moment, is Acquisition Date.

Cohort analysis

So a cohort analysis is basically the analysis of a group of people, in this case people who interacted with your website at the same date or date range. When clicking Cohort Analysis in Google Analytics, it’ll look something like this:

Cohort Analysis Google Analytics

I don’t know about you, but this isn’t really immediately clear to me, so let me walk you through how to look at it. The chart at the top is a visualization of the average user rentention (percentage of returning visitors) for the date range, which is 7 days by default.

The most interesting, however, is the table below the chart. This actually gives us insight in what percentage of people returned to your site within 7 days of visiting it for the first time. Day 0 corresponds with the date in the first column. Day 1 is the first day after someone visited your website for the first time. So the 4.32% at Day 1 in the March 10th row means that 4.32% of the people who visited for the first time on March 10th, visited again on the next day (March 11th). Day 2 is the second day (March 12th) and so on.

Note: this is a breakdown of New Users, so although it says “All Sessions”, this only includes people having visited your site for the first time.

What can I do with this?

This is a question that I immediately asked myself. It wasn’t completely clear to me right away, so I might be a bit slow, or it’s just not that obvious. I’ll let you be the judge of that ;)

Let me give you an example (not, by the way):


So what happened on March 14th or 15th that made people who visited this website for the first time on March 14th visit again the next day? The retention rate is about 2% higher there, and even on day 2 the retention rate is higher. Maybe they wrote a nice post? This can be a great way of figuring out whether what you’re trying (new content, new campaigns, etc.) is actually working.

Breaking down the cohort

If you need a more specific look on what’s happening, either because you don’t know why the retention rate was lower/higher, or because you’re just a data geek, you’re in luck. You can actually ‘break down’ your cohort analysis by using segments. For instance, if I were to use the Mobile and Tablet Traffic segment on the data above:


Google Analytics will give me this cohort report:


This shows the data for people who not only visited your website for the first time in the set timeframe, but were also on a smartphone or tablet when viewing the site. You can have up to 4 of such segments active at the same time. This way you can see whether the (expected) effect happened for all sorts of people, such as people on mobile phones, people from search engines or direct visitors, etc.

Other metrics

You can actually select quite a few metrics that will make the cohort analysis useful for a lot more than returning visitors:


Although the Cohort Type has a dropdown, it actually just has the one option. The Cohort Size can be set to ‘by day’, ‘by week’ or ‘by month’ and the Date Range will change accordingly. The most interesting though, is the Metric dropdown. You can select a lot of per user metrics (revenue, pageviews, transactions, etc.) or total metrics (again revenue, pageviews, etc.) apart from the Retention metric I used in the examples above.

This means you can actually see a lot of effects, such as whether your overall revenue or revenue per user has increased after a post or campaign. Of course, you can normally see your sales or revenue increase if you have a successful campaign, but this data is different.

You can now see how much revenue you got from people that visited your website for the first time on a specific date and see if these new visitors bought something on that date or in the days to follow. And since you can see this for an entire date range, you’ll also be able to see if that’s a higher or lower revenue than was to be expected.

Let me give you an example. Say you changed your landing page recently, which is tailored to just convincing new visitors of your site to buy a product. You could just be looking at the revenue from new visitors and see if it increases. However, if a visitor were to visit your website for the first time, only to return the next day to buy your product, Google Analytics wouldn’t show it as a new visitor anymore. And that’s why these cohorts actually work: the visitor was new at the set date, so even if they buy the product a day (or 2, or more) later, they’ll still show up in the cohort analysis. So you’re not just measuring direct effect anymore, you’re measuring delayed effects as well!

By the way, to be sure you have just the visitors that visited that specific landing page, you should create a segment for visitors who visited that page.

The downsides

While looking at the cohort analysis for, I noticed that the Retention metric is quite difficult for our domain. Our traffic, even from the new visitors, is just too stable. The pattern was just the same all the time, no matter what date range I selected. This is probably because we have such a steady flow of new visitors, mainly from Google, that any lift here would only be a small change in percentage.

So, the changes in the percentages are too small; if everything between 3.5% and 4.5% is the same color, it’s pretty hard to distinguish any real differences. Of course, I could just look at the percentages, but that’s just not as convenient.

More importantly, though, we can only create cohorts based on Acquisition Date at the moment, which is a nice start, but I do really hope they’ll start adding more Cohort Types. Just the Acquisition Date is really not enough, for me at least. I’d love to see cohorts of people buying a specific product (category), for instance.

Summing up

The cohort analysis can definitely give you some insights that weren’t readily available before. However, it does still require more than just basic knowledge of Google Analytics and might be a little confusing in the beginning. So I’m not completely sold on this feature yet, but to be fair; it is still in beta, so who knows how much better it will get right?

Did you think of any other cool ways of using the new cohort analysis feature? Or do you think I said something utterly stupid in this post? Let me know!

This post first appeared as Cohort Analysis in Google Analytics on Yoast. Whoopity Doo!

Custom dimensions and SEO

custom dimensions and seoAs you might’ve noticed, we’ve added a couple of pretty cool features to the Google Analytics by Yoast Premium plugin. This post is another sequel to the custom dimensions posts, in which I’ve been explaining the custom dimensions in the plugin. Today I’ll explain the new custom dimensions we’ve added and how they can actually help you on your SEO as well!

If you haven’t read my first two posts about custom dimensions and/or don’t know what custom dimensions are, please read the first two posts first. Lets start off this post with the new custom dimensions: SEO Score, Focus Keyword and Tags. Be sure to read this post all the way to end, because there’s a surprise at the end that might just save you some money!

SEO Score

This is a custom dimension that’s only available if you’re also running our WordPress SEO plugin. If you don’t have this plugin installed, you won’t be able to select this custom dimension. And that’s really a shame, because it’s quite awesome!

Let me explain why; the SEO score custom dimension actually allows you to to sort or filter your traffic by the SEO Score which can be found right above your Publish/Update button when you’re writing/editing a post:

Custom Dimensions and DashboardsEdit_Post_‹_Yoast_—_WordPress

So all of your posts and pages that have gotten a Good score will be one group, all the OK posts and pages in another, and so on. There’s obviously also a group for posts you haven’t filled out a focus keyword for, which will give an N/A score. Let me show you what this looks like in Google Analytics:

SEO Score Google Analytics

As you can see, we have a few posts and pages for which we didn’t fill out our focus keyword. As expected, the posts with the highest SEO Score (good) are getting the most traffic. So optimizing your pages seems to actually work! Yay!

However, even more interesting is to see if there are any pages with lower SEO scores that still get a decent amount of traffic. These pages are already doing well in the traffic department, and can actually still be more optimized, meaning they can probably get even more traffic than they’re getting already.

So lets filter out those hidden gems. The first step is to filter for the pages with an OK score. To do so, click ‘advanced’ and fill in ok:


Second, add a secondary dimension named Destination Page:


This will give you a list of the pages that have an OK SEO score, sorted by pageviews:


As you can see, for us there’s one page in particular that’s getting some nice traffic, even though its SEO score is only OK. It’s very easy now to just go and see if the post can become a bit more optimized.

Of course, you can do the same thing for the pages that have a Bad, Poor or N/A SEO Score. This way you can find some hidden gems you might’ve overlooked in the optimization process altogether.

Focus Keyword

The Focus Keyword custom dimension is again a custom dimension that’s only available if you’re running WordPress SEO. If you’ve created the custom dimension in Google Analytics, you’ll be able to see this report in Google Analytics:

Focus Keyword Google Analytics

If you see a Focus keyword “focus_keyword_not_set”, that obviously means that your focus keyword is not set. If that’s a big part of your pageviews, then you should read this post! You should definitely make better use of our WordPress SEO plugin!

What you could do now, is look for some common denominators in your focus keyword list. For us, an obvious one would be WordPress. We write a lot about WordPress and have quite some longtail keywords for that as well. If we enter WordPress in the search bar, we get this:


As you can see, 24% of our total traffic is from posts with WordPress in their focus keyword. So this is quite an awesome way to see which (groups of) keywords are getting you the most traffic. On top of that, this also gives you a nice list of everything you’ve already written about. Some (longtail) keywords might be missing, or maybe you’d expect more traffic from a certain keyword (group).

In short, the Focus Keyword custom dimension gives you a lot of insight on how you’re doing with your focus keywords. You can now quickly find if you’re missing anything and act accordingly!


The Google Analytics by Yoast plugin now not only supports categories as a custom dimension, but also tags! I’ve actually already predicted that in my first post on custom dimensions. Neat huh? ;) So this can give you an even more specific idea of what kind of subjects are popular on your website:

Tags Google Analytics

The first one in that list is actually our WordPress SEO plugin page (which I found out using the Destination Page as a second dimension again). So you can actually see the Keyword Research tag is doing a good job as a singular tag. However, all those tags related to WordPress plugins are getting a big amount of total traffic. This is obviously no surprise to us, but this is a very good way to find subjects you didn’t know were popular on your site.


Our Google Analytics by Yoast plugin now also includes dashboards! So there’s no need to go into Google Analytics anymore for your basic statistics:


As of now, you can quickly check your Sessions and Bounce Rate for the last month. More timeframes will be available in the future.

As you can see, there are two more tabs in there. The Reports tab can give you the amount of sessions for the last month by Traffic Source, Popular Pages or by Country. Unlike Google Analytics itself, the stats there are instantaneous. So no annoying waiting for data to load, it’s just there when you click!

The last tab will only work if you have the Premium version of our Google Analytics by Yoast plugin. It will give the amount of sessions per custom dimension. Especially useful if you want to see which author has gotten the most traffic lately, for example. This data is also available instantaneously!

Both these reports have a search function as well. Type in anything you want to search for, and the results will be, again, instantaneous! It’ll actually start giving you results as soon as you start typing! This is a very quick way to filter your data and is also just fun to do!

More premium, more power!

These are the new custom dimensions in the Google Analytics by Yoast Premium plugin! They bring a lot of extra power, especially combined with our WordPress SEO plugin. Together these plugins are becoming a force to be reckoned with. And that, combined with the holidays, is exactly why we’ve created a bundle, named Prancer’s Premium Plugin Pack, which includes:

  • WordPress SEO Premium;
  • Google Analytics by Yoast Premium;
  • Optimize your WordPress site eBook.

This bundle is available until January 2nd and will actually save you 35%! 

This post first appeared on Yoast. Whoopity Doo!

Google Analytics custom dimensions

Custom Dimensions is a very powerful ‘tool’ within Google Analytics which will give you a lot of extra tracking power. However, the fact that it’s powerful also means that it can be hard to understand or know what you can do with it exactly. What are custom dimensions and how you can use and find them in Google Analytics?

What are custom dimensions?

Before jumping in, let me first explain what custom dimensions actually are. Usually, when you’ve added the general Google Analytics code, all the general things will be tracked and you can use the predefined dimensions. Custom dimensions are a way for you to track extra things. And as the name implies; they’re custom. This means that you can actually specify yourself what you want Google Analytics to track.

So instead of being dependent on what Google Analytics hands you out of the box, you’re actually able to track whatever you think is important! You can start tracking the author of each post, or its category or post type. And then you can see how much traffic each author, post type or category gets, for instance. Amazing, right?

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

Setting up custom dimensions

Setting up custom dimensions in Google Analytics can be a hassle because you need to modify your tracking code. And that’s something you need a developer for. Or if you’re handy with Google Tag Manager, you can set up custom dimensions with that awesome tool. Looking for a plugin that can implement dimensions for you?  Use the MonsterInsights Pro plugin.

Where to find custom dimensions?

Google Analytics being the kings of usability they are, decided the custom dimensions needed to be in a different spot altogether. Note, it’s not even in the Reporting tab, but in the Customization tab, which can be found at the top of the left sidebar:

Customization tab

But this isn’t all. You see, Google Analytics really wants to make you feel you’ve earned the data they’re giving you. Before you get to the good stuff, you’ll have to jump some hoops. Let me explain with this video:

Note: As you can see in this video, we’ve chosen pageviews as the metric, because that makes the most sense to explain things. If you’re more adept at using Google Analytics, obviously you can play around here. And if it goes wrong, there are no real consequences for the actual data. For now, we’ll only be going into custom dimensions with the metric pageviews.

These are the steps you’ll have to take for every custom dimension you want to be able to view. The custom dimensions that we will discuss are: Author, Category, Post Type, Logged In and Published At.

Data from custom dimensions

Some of these custom dimensions might not mean anything to you, so I’ll explain them as clearly as I can. I’ll also explain why these custom dimensions are useful and what kind of data you can get from them.


When combined with the pageviews metric, the Author custom dimension shows you the amount of pageviews on posts and pages grouped by author:

Author custom dimension

So this is the traffic of all the posts and pages that had an author associated with it. As you can see, Joost is dominating this. This is actually not that weird. Not only has Joost written the most posts on, he also created most pages. So what if you just want to see the posts, so you can see which of your authors is generating the most traffic? That’s where another custom dimension comes into play already: Post Type!

By using the Post Type custom dimensions as a secondary dimension and filtering for “post”, you’ll see just the posts. Let me explain with another quick video:

Now you’ll see the traffic to just your posts, grouped by author. As you can see, you can filter for any kind of post type you want. You can add more metrics to this grid to make it even more meaningful. For instance, average time on page or page value, to find out who writes the most interesting posts or posts that lead to sales. These metrics can be added when you edit your custom report.


The Category custom dimension gives you insight in which category gives you the most traffic:

Category custom dimension

As you’ve probably seen, the third category in there actually consists of two categories at the same time. Sometimes you just can’t go around adding two categories for one single post. If you want to see the total of one specific category, just fill in that category name in the search bar:

Custom dimensions category filter

This will show just the categories that have the category name you filled in, in this case ‘seo’. Of course, you can also use the Author custom dimension, for instance, as a secondary dimension. This would allow you to view how each of the authors are doing in each of your specific categories. This would be done the way I showed you in the second video of this post.

Custom dimensions in the Reporting tab

Luckily, the custom dimensions haven’t completely disappeared from the Reporting tab. All your custom dimensions can still be used as a secondary dimension in all of your datasets in there. So if you ever want to see how your authors, post types, categories, are doing for a certain dataset.

Custom dimensions are awesome

As you might’ve seen by now, custom dimensions are really powerful. One custom dimension is already powerful and can give you a lot of insight. However, combine it with another custom dimension or metric, and it becomes even more powerful.

And the possibilities are nearly endless. Remember: I’ve only used the metric Pageviews for this post. There are so many other metrics you can use custom dimensions with! And don’t forget, you can make the data even more meaningful if you combine custom dimensions with segments. Just be creative and be amazed. If you do need more inspiration, The Next Web has written a post about the custom dimension they use for their own website: 50+ custom dimensions in Google Analytics.

Read more: ‘Understanding bounce rate in Google Analytics’ »