Analytics & Marketing Insights

How to Use Filters In Google Analytics to Analyze Ecommerce Sites

How to Use Filters In Google Analytics to Analyze Ecommerce Sites

April 27, 2011           Google Analytics

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.


  • I’m a big fan of the ‘profile filter’ approach because, as you point out, it allows you to make side-by-side comparisons.

    One extra suggestion: I tend to re-name the page with something very different from the real page URL, such as aProductPage or aCategoryPage so that it is very obvious that the data has been manipulated and should not be confused with the data from an unmodified profile.


  • Thanks for the feedback and suggestion Tim! Agreed!


  • Strong article with great screenshots. I would agree these points are certainly up there in the Google analytics priority.

  • Hi Richi,

    These filters still work but every situation is different.
    The new features just make GA much more powerful in terms of analysis possibilities and segmentation.



Connect with Blast Analytics & Marketing

Connect with us on LinkedIn