Setting up and Using Google Analytics Content Groups in Megalytic Reports

Published June 12, 2015
Everybody knows you are the data guru. That means the tough reporting challenges always end up in your lap. But you don’t mind—you’re good at what you do. It’s also kind of interesting to be on the frontlines, fielding questions and observing what people are most concerned with. Lately, you’ve been fielding a lot of requests for data organized by content type.
The content marketing department wants to see data on how well stories about new mothers are doing. The media department wants to know how well video articles are doing. The only trouble is that the website isn’t organized by content type. So, traditionally, there was no way for Google Analytics to report on just the stories about new mothers or the articles containing videos.
But a solution is finally here!
With the help of Content Grouping, you can now tell Google Analytics how to identify the type of content that you want to report on.
And, since Megalytic supports Content Groups, you can include stats organized by content type in your Megalytic reports. Isn’t the future wonderful?
Let’s look at an example to see how all this works in practice.


Blog Image of Content Groups


Setting up Content Groups in Google Analytics

Setting up Content Groups is a two-step process. You first need to define your groups in Google Analytics. Then, in many cases, you’ll need to set up tracking for the Content Groups on your website.

Google provides instructions on how to Create/edit Content Groups. As described in that article, there are three ways to define Content Groups: tracking code, extraction, and rules. If your website has a well-defined structure (e.g., all videos are found under ‘/video/’) then you may be able to use rules or extraction. Ecommerce websites, for example, are often structured so that rules and extraction can be used successfully. In such cases, for example, all the content related to men’s clothing may be stored under ‘/clothing/men/.’

However, in my experience, websites rarely segment content into page structures well-defined enough that rules and extraction can be used to define Content Groups. Furthermore, the structure of the website may change down the road, and if you use rules and extraction, changes in structure may cause pages to be assigned to the wrong Content Group.

As a result, I find myself using tracking code for defining Content Groups. In Google Analytics, you set this up in the Admin section by first clicking on “Content Grouping” and then clicking on “+ New Content Grouping.”


Content Grouping - Create


Next, select “Group by Tracking Code,” and enter a Name for the Content Grouping. In this example, we chose the name “Support Type” because we were creating a group to track stats on the different types of content in our support website. You should choose a name descriptive to the grouping you are creating (e.g., Product Type, Blog Content Type, etc.)

Next, under “Select Index”, choose a number from 1 – 5. It doesn’t really matter which one you pick, just don’t select one that you have already used in a different Content Grouping definition. The index that you choose affects the tracking code that you need to include in your website to implement the new Content Grouping.


Content Grouping - Select Index


The tracking code needed to be added to your website to implement Content Groups is provided by Google and circled in the above screenshot. This code must be added to every page on your site with content you want to track.

Adding Tracking Code for Content Groups to Your Website

Wait…every page?

How do we add this tracking code to every page we want to track without swamping our development team? Google’s instructions for setting up tracking code for Content Groups, while useful, do not address the issue in terms of real-world websites. In particular, it is necessary to understand how to integrate this tracking code with a Content Management System (CMS).

As an example, let’s look at WordPress. When you post content using WordPress, most themes provide the option of selecting Categories to classify your content. This provides a natural framework for Content Grouping because a post’s Categories can be used to define its content type in a Content Grouping. For example, suppose that in WordPress you have the Categories: “Video,” “Press Release,” and “Article.” You can use those categories to define the Content Grouping.

Megalytic’s support content is hosted in WordPress using the KnowHow theme to provide the CMS features we need to run a support site.

As you can see below, each time we create a support post, we can assign Categories to indicate the type of post.


WordPress Categories for a Post


To add tracking code for Content Groups, we can take advantage of these Categories and insert the proper code directly into the WordPress theme. So, for example, the tracking code that would be included for a Video post looks like this:

ga('set', 'contentGroup1', ‘Video’);

The tracking code that would be included in the Article post type looks like this:

ga('set', 'contentGroup1', Article);

But there are a number of problems here:

  1. You may not be a programmer who can modify the WordPress theme to include this tracking code.
  2. You, or your organization, may not want to modify the WordPress theme for fear of creating headaches down the road (for example, when you need to upgrade).
  3. The programming team might be willing to do the necessary modifications, but they may be too busy to give it a very high priority. So, for practical purposes, it will never happen.

Luckily, this problem can be solved using Google Tag Manager and one Wordpress Plugin. This solution requires very little programming and does not require any modifications to the WordPress theme.

To see the details of this solution, check out this technical post: Implementing Google Analytics Content Group Tracking in WordPress using Google Tag Manager.

Content Grouping in Google Analytics Standard Reports

Content Groupings are defined for individual Views. So, in order to see reports that make use of the Content Groupings you have created make sure you are using the correct View.

Once you have selected the correct View, a good place to start looking at Content Group data is in the All Pages report (Behavior > Site Content > All Pages). To see the Content Grouping stats, select your Content Grouping as the Primary Dimension using the select box direction above the table. This Content Grouping selection option will only appear after you have created a Content Grouping.


How to View a Content Grouping


In this example, you can see that the User has defined three content types in this grouping: Article, Frontpage and Video. The statistics showing up for (not set) come from pages where the Content Group tracking code has not been implemented, so no content type value is assigned.

One of the interesting insights we can see right away is that the Video content type has a much higher Avg. Time on Page (02:24) than the Article content type (01:23). Video also has a significantly lower Bounce Rate (44.08%) than Articles (78.56%). However, the total Pageviews for Video (292,912) is much lower than Articles (21,395,605).

Taken together, these statistics may indicate that this website could use more marketing time and energy spent on promoting their videos since these seem to better engage the audience.

Other standard reports where you can use the Content Grouping dimension include:

  • Landing Pages (Behavior > Site Content > Landing Pages)
  • Page Timings (Behavior > Site Speed > Page Timings)
  • Event Pages (Behavior > Events > Pages)

Using Content Groupings in Megalytic Reports

Content Groupings can provide valuable insights into the relative performance of content types. To communicate these insights effectively to your clients or management you’ll want to include them in your Megalytic reports.

You can easily do this with the Traffic by Content Group widget. Simply select it from the Widget Library and drag it into your report.


Megalytic Content Grouping Widget


Next, open the Widget Editor by clicking on the gear in the upper left corner of the widget and select the Content Grouping you want to use in the widget. You may need to refer back to the Admin section of Google Analytics to know the number of your Content Grouping (1 – 5).


Selecting the Content Grouping in Megalytic


Click on the gear again to close the widget editor. Then, add a Notes widget to highlight the insights provided in the table. Text commentary should always accompany important data to help readers identify the key insights.


Content Grouping in Megalytic with Note


Megalytic enables you to pull together the Content Grouping data with text to make a compelling case that more marketing promotion needs to be applied to Video.


As the Video vs Article example shows, Content Groupings can provide powerful insights that can lead to better marketing decisions. This article has shown how you can add Content Groupings to Google Analytics; how you can add the necessary tracking code to your site; and where you can find Content Grouping statistics in Google Analytics. For reporting purposes, you can include these Content Grouping statistics in Megalytic reports and add text commentary to provide your audience with compelling insights into the performance of their content.


When the client first came to you, you talked up the value of Google Analytics. You emphasized the importance of seeing where your traffic was coming from. You went on and on about how Google Analytics can show traffic sources to pinpoint whether people came from search, social media or a specific site referral, and how valuable this data was. You sold them on it, so much so that your client looked forward to receiving that first report, the magical day when they would finally understand where visitors were coming from.
But then the report came, and it looked like this:



It showed that 10% of your client’s traffic came from “(direct)/(none)”. What does this label mean? How do you explain Direct traffic to your client? Better yet, how do you explain “none”?
Let’s take a closer look at understanding Direct traffic in Google Analytics and how we can address it with clients.
Digital marketers spend a lot of time focused on PPC and SEO campaigns in order to drive desirable traffic to a website. The phrases we’re ranking for and bidding on get meticulous attention, so much so that we often forget about some of the other ways that visitors find us.

We put a tremendous amount of the effort we put into reviewing organic search data and PPC campaign performance in analytics. But how closely do we monitor referral reports?

If that’s not a channel you review regularly, you may be missing out on seeing traffic that is coming directly from links you’ve obtained around the web, local business listings, news mentions, and more. Many times, links are only considered as a means to an end, a metric that Google uses in determining how to rank sites in the SERPs (search engine results pages). But the fact is, many of a site’s links may be directly contributing to its traffic.

In this article, we’ll review how to look at referral reports in Google Analytics, and some of the many ways to use that data to better inform your web marketing decisions.


Remember how your mom told you not to stand too close to the television because it might hurt your eyes?

The same rules can apply to data. If you’re too close, you may miss the patterns and trends that are crucial to understanding your website’s performance. You can’t judge a site’s performance looking at data in the bubble of a single day, you must consider any day’s traffic compared to the days before and after.

Google Analytics makes it fairly easy to analyze trends over long periods of time. But it also allows you to stand right in front of that TV, to look at more granular levels of time, right down to the hour.
There’s a better way to get that close to the data, without burning your retinas. We’ll cover how to analyze traffic effectively in today’s post.