Using Filters in Megalytic to Customize Analytics Reports

Published May 22, 2015
The company counts on you to put out reports that track how well its marketing campaigns are doing so that everyone who cares about the marketing understands what’s working and what isn’t. You’re up to the challenge, and it really is a challenge considering everyone wants to see the analytics data their way.
The Content Marketing team wants an analytics report that shows the behavior of visitors who arrive at the website via the blog. The regional office in Austin, TX wants to see the numbers for Texas website visitors. And everybody wants the Google Analytics Spam removed and is curious how you’ll be handling that (no pressure)
Sound familiar? We know it does! Different groups need to see different data in their reports. How can you manage this customization without endless hours of extra work?
The solution is Megalytic Filters.
Megalytic Filters enable you to restrict the data that appears in a chart or table. This makes it easy to show only the Sessions where the user arrived via the blog. Or, where the user visited a promoted page. And, of course, you can use filters to exclude those annoying spam referrals like 4webmasters, best-seo-offer, etc. With Megalytic Filters, everybody wins (and you get back countless hours!)
Lets get started with some examples.


Blog Image Megalytic Data Filters


Filtering by Landing Page (e.g., Blog Visits)

The Content Marketing team would like a regular report showing inbound traffic to the top three blog posts. The Traffic by Landing Page widget can show the traffic coming in to all pages, which you can filter to restrict it to show only the blog posts.

In Megalytic, start by dragging the Traffic by Landing Page widget into a report. Open the widget editor, and click on “Show Filter.”


Adding a Filter in Megalytic


This opens up the filter editor. Almost all Megalytic widgets have a filter editor. In this case, we want to restrict reporting to blog traffic. To set up the filter, we need a pattern that only matches blog posts. In this case, the blog is hosted at So, we set up the filter to include only Landing Pages that begin with “/blog/” and then click “Apply.” The Landing Page table for this widget now shows only the traffic coming to the blog.


Filter by Landing Page in Megalytic


We will provide the Content Marketing team with the table above, which shows a ranking of the top blog posts over the last 13 weeks. However, we can do better by using a time series version of this widget to tell a story about how the blog posts are doing over time.

To do that, look under “Chart type” in the widget editor and click on the line chart symbol. This will convert the widget display from a table to a line chart.


Switch from Table to Line Chart in Megalytic


As you can see below, this time series data tells an interesting story that the Content Marketing team will definitely be interested in. Among the top three blogs, there are two that consistently generate 200 and 400 weekly visitors. We also see the top blog post, which started out generating about 400 visitors a week, has shot up to achieve over 2,000 weekly visitors in the last month. Woah!

As your company’s data analyst, you definitely want to dig deeper and understand what happened to cause this spike. You should work with the Content Marketing team to review your findings and help them learn from the success of this post.


Megalytic Chart showing Top 3 Blog Posts


Filtering on Geography

If your business has a regional structure, like offices in multiple geographic locations, then you will probably need to report the digital marketing stats on a regional basis. In Megalytic, you can do that with filters.

To show the monthly website traffic for Texas over the last year, you would start with the Rolling Average Comparison widget that displays the monthly traffic, as well as the 90 day rolling average that provides a smoothed out view of the monthly ups and downs.


Megalytic Chart of 12 Month Traffic Pattern


To turn this into a chart that only shows the traffic coming from Texas, you open the widget editor and set it to include only data where the Region exactly matches with “Texas.” In Google Analytics (and therefore in Megalytic), the Region dimension translates to states in the USA.


Megalytic Filter by State of Texas


After you click “Apply,” you will see the bars shrink down to show only the volume of traffic coming from Texas.

This “Texas Filter” can be saved and reused in other widgets, so it is easy to create a full digital marketing report for the Texas regional office that includes data exclusively for Texas. Below, we describe how to Reuse filters in more detail.

Spam Filtering

Spam has become a real problem in Google Analytics reports. In our blog post on How to Filter Out Fake Referrals and Other Google Analytics Spam, we describe how to filter out spam from inside your Google Analytics account.

However, if you are reporting on historical data–data that Google Analytics collected before you added your filters in account to remove the spam—then you will want to use the filters inside Megalytic to remove spam from your reports.

To get started, drag the “Referral Traffic” widget into a report. If your website doesn’t get a lot of traffic, the spam will be very noticeable in this report.


Report Showing the Referrer Spam


To remove the spam, we are going to create a Megalytic filter with two components. One component will remove the Ghost Referrals, while the other will take care of spam bots. To learn more about these two different kinds of spam, refer to the linked post above.

The first part of the filter restricts traffic to include only valid hostnames. In this case, the hostname of the website is We also allow the hostname – because that is the hostname that shows up when a user is viewing a translated version of your website.

Since ghost referral spammers are not actually visiting your site, but sending spam directly to your Google Analytics account, they don’t know your hostname and have to use something else. As a result, it is very effective to use a filter like this that only lets in traffic that has a hostname that is valid for your site.

The second part of the filter deals with malicious bots that actually do visit your site. These spammers will have the correct hostname, so the first filter will not remove them. The second filter removes traffic from known spam sources by using a regular expression to match the spam sources. In this case you can see we have used this expression which uses “|” (OR symbol) to separate the spam sources.


After you click “Apply,” you will see the spam traffic has disappeared.


Megalytic Spam Removal Filter


Reusable Filters

Sometimes, you want to apply the same filter to lots of different widgets. Megalytic makes it easy to do this by saving your filters to the Filter Library. Once you have a filter you like, simply click on “Add to Library” and give the filter a name.


Megalytic Saving a Filter


Now that we have saved the Spam Filter we can use it on other reports, for other websites. To see how this works, drag a new Referral Traffic widget onto your report. Make sure that it has some spam traffic, and then click on the “Library” button to open the filter library.


Opening the Megalytic Filter Library


Once the library is opened, click on the “Spam Filter” item. This will take the filter we just created and apply it to this widget.


Selecting a Filter from Megalytic Library


You may need to make some adjustments. For example, in the first part of the filter that selects on hostname, you will need to change the original hostname (i.e., and replace it with your own domain.

Reusable filters can be applied to any widget that support filters, not just the Referral Traffic widget. For example, you might want to apply this kind of filter to a set of KPIs that track engagement. If you do this, you will notice that the spammers are artificially lowering your engagement metrics.

In the image below, we show the same engagement metrics, but in one widget the spam is filtered out. Notice that, with the spam filter implemented, the engagement metrics are significantly improved.


Megalytic Engagement KPI Report



Filters are useful for tailoring reports to the needs of a specific audience. The first step in creating a filter is understanding what your audience wants to see. Is it data on traffic to only a specific part of the website? Then you want to filter on landing page. Is it data on traffic from a specific geographic location? Then you will want to filter on Countries or Regions. With a little practice, you will learn how to use filters to present exactly the data that your audience wants.


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.