News and Updates


Better Magento Reporting in Google Analytics – Part 1

Magento eCommerce platform is incredibly powerful when paired up with Google Analytics. However it’s flexibility, particularly in paging, categories, and layered navigation, can create some difficulties for SEMs working in Google Analytics. I’d like to show a simple method for cleaning up your Google Analytics reports and removing false duplicate page URLs.

(BTW this all applies to many other eCommerce platforms as well as other CMSs such as WordPress, Drupal, Joomla, or really any other CMS-like application that allows users to navigate by filtering.)

OK, on with it!

The Pieces to the Puzzle, the URL Query Parameters

Logging into Google Analytics, you might see a bunch of URLs like these in your Google Analytics Reporting tab.

Screen Shot 2015-09-28 at 12.22.36 AM

What URL Query Parameters Mean in Magento

When a visitor to your Magento site uses Magento’s layered navigation and categories, they are just choosing certain product attributes that they are searching for. Let’s say they start by choosing a particular Category like “SOSS Invisible Hinges”, and then they choose “Full Sized Entry Door” under the “Application” attribute. They can continue filtering their search results based on products that still meet their requirements. This works wonderfully as a guided search. Every time a visitor filters their product search based on Magento’s attributes, Magento adds another query parameter to the URL and resubmits the search. Let’s look at the URLs that are successively generated when a visitor chooses attributes.

URL Query Parameters for Layered Navigation


After choosing a Category

After choosing an Application

After choosing a Finish Swatch

After choosing a Fire Rating

Each time a visitor refines their search by choosing another attribute, Google Analytics adds another page to it’s report. That’s how you end up with reports for what is technically the same page but has zillions of different rows in Google Analytics, like we saw above.

Let’s look at something that is common to almost all Magento sites, paging.

URL Query Parameters for Paging

After going to page two

After going to page three

After going to page four

You can see that the visitors are just paging through all of the site’s products, 9 at a time. They are not really going to different pages. To fix this we need to add those URL query parameters that we keep seeing (“limit” and “p”) to the “Exclude URL Query Parameters” section of this web property’s View Settings page. Let’s do that.

How to Strip Out URL Query Parameters

Log into Google Analytics and click the Admin tab at the top of the screen. Find the Account that holds your web Property and drive down into the View section.

Google Analytics View Settings


Now head into View Settings so we can tell Google Analytics which URL query parameters to strip out.

Let’s say we have a lot of paging URL query parameters in our Google Analytics Reports. We simply need to add the URL query parameters we saw to the “Exclude URL Query Parameters” field in View Settings.


Save your settings and enjoy cleaner Google Analytics Reports!

Lessons Learned and Next Steps

We covered how the URL query parameters for Magento (as well as other CMS applications) can affect Google Analytics page reporting. We can filter out any URL query parameters that we like so we filtered out the paging query params to clean up our reports. You will still see other attributes like “cat”, “application”, and “finish_swatch” or whatever yours are for your store. We can either filter those out too, or use them in a potentially more useful way by further customizing the way Google Analytics handles URL query parameters. Stay tuned for the next part in this series on cleaning up magento URLs in Google Analytics.


Search Engine & Social Media Optimization

Not so long ago, search engines relied heavily on fields in the page header that show additional information about a page, like attributes for the topic on a page. The page title is visible to the user but meta tags or meta data were not displayed and could hold keywords, page descriptions, author information, etc. These fields worked well and a search engine crawlers could quickly identify what the page content was about without really looking at the page. These tags soon turned into a tool for developers to try to trick crawlers. Overloading these fields was a common practice and crawlers had to get better.