Blast Analytics and Marketing

Analytics Blog

Supporting Leaders to EVOLVE
Category: Digital Analytics

How to Use Filters In Google Analytics to Analyze Ecommerce Sites

When analyzing data on a site that has thousands of pages, it is often useful to group data by page type and measure the performance of those page types. As an example, let’s say that you have an ecommerce site. A typical ecommerce site will have:

  • a home page
  • landing pages
  • regular content pages (you could segment these further – create logical groupings)
  • category pages
  • product pages
  • a cart page
  • a checkout page(s)
  • and a receipt/confirmation page.

If you have thousands of product skus, analysis on the performance of all of your product pages (in aggregate) is sometimes not easily accomplished. We will discuss two ways to easily accomplish this.

Option 1: Content Filter Approach

If you have a URL structure such as, you can apply a filter to your top content report (or landing page report) to look at all pages that begin with /products/.
Content Filter Analysis

The green-highlighted area above contains the aggregate data on product page performance. You can also use a regular expression to filter your pages to look at a specific URL structure.

TIP: Using the new Custom Report changes in Google Analytics v5, you can create a filtered custom report so that you have easy access without having to remember what to filter each time you want to look at this data.

Option 2: Profile Filter Approach

If your URL structure is a bit more complicated but does have a distinct pattern to indicate whether it is a category or product page, then Google Analytics profile filters are a great option. Note that you should create a new profile and add these filters to that new profile.

WARNING: Do NOT add these filters to your current profile, as it will manipulate all data going forward. This technique is also great if you prefer not to go in and apply filters each time you want to look at this data.

Let’s say that you have the following URL structure for your category pages and product pages:

  • Category Pages:<category-name>
  • Product Pages:<category-name>/<product-name>

This is a bit more complicated to filter for in your Top Content report right? If you just put in a content filter of /shop/ it is going to match both category and product names.

This is where the power of a Google Analytics profile filter becomes useful. Profile filters are filters that are applied before the data enters the report database on the Google Analytics servers.

Given the URL structure above, you’ll want to add two ‘Search and Replace’ filters — one for products and one for categories. The order of these filters is also important because if you have the category filter first, then product pages may be rewritten.

Product Page Rename

Product Detail Rename Filter

Category Page Rename

Category Page Rename Filter

As mentioned previously, the filter order is important, so after you add these, be sure to assign the filter order to ensure that the product search and replace filter comes before the category search and replace filter.

GA Filter Order

So, what are these Google Analytics filters doing?

It is fairly simple. If a pageview is tracked as /shop/<anything>/<anything>, then the product filter is going to rewrite that and make it come into the reports as /product-detail. This will always be the case and as a result, all product pages will show up as an aggregated entry of /product-detail. Then, if a pageview is tracked as /shop/<anything>, it will be rewritten as /category and populate the content reports as such.

Page Type Content View

In this example, you’ll be able to quickly go into this new profile and look at the category and product pages in aggregate. You’ll easily be able to look at the landing pages report or create a custom report in Google Analytics that leverages this page-type grouping.

Compare Page Types Side-by-Side

The biggest advantage of the profile filter approach over the content filter approach is that you can easily compare the page types side-by-side and throughout content reports. The new profile switching feature in Google Analytics version 5 remembers what report you are looking at, which makes it easier to switch between profiles when performing analysis.

Joe Christopher
About the Author

As Vice President, Analytics at Blast Analytics, Joe leads a team of talented, analytics consultants responsible for helping clients understand and take action on their vast amounts of data, to continuously improve and EVOLVE their organizations. With over 20 years of experience in analytics and digital marketing, Joe offers a high-level of knowledge and guidance to clients across all industries. He is an expert in all major analytics platforms including Google Analytics and Adobe Analytics, as well as various tag management systems such as Tealium and Adobe Launch. He also consults on data visualization, data governance, and data quality strategies. Having extensive expertise in many areas, has enabled Joe to become a well known thought leader and speak at industry events such as Tealium’s Digital Velocity series. Joe remains on the pulse of various information technology, programming languages, tools and services, keeping Blast and its clients on the leading edge.

Connect with Joe on LinkedIn. Joe Christopher has written on the Blast Digital Customer Experience and Analytics Blog.

Related Insights

We’re here to help with tips and insights on the following topics:

Data Management Digital Analytics Digital Experience Digital Transformation Marketing Activation User Privacy
HIPAA and Analytics White Paper CTA

Featured White Paper

Healthcare Analytics and HIPAA: Ways to Minimize Risk and Ensure Compliance

The rise in digital data and analytics adds complexity and risk for healthcare organizations. Those that don’t comply with data privacy requirements, including Health Insurance Portability and Accountability Act (HIPAA), could face heavy fines, civil action lawsuits, and even criminal charges. Not to mention loss of patient trust.

Download the White Paper

Ready To Do More With Your Data?

If you have questions or you’re ready to discuss how Blast can help you EVOLVE your organization, talk to an Analytics Consultant today.

Call 1 (888) 252-7866 or contact us below.