How To Remove Ugly URL Parameters from Google Analytics Reports
Is Google Analytics cluttering up your reports with 100’s or thousands of unique pages that don’t really exist?
The problem is created by ugly URL’s. You know what I mean when I say ugly URL’s?
Here’s an ugly one:
What makes it ugly is the ?txn=222050&tl=30
These are parameters that are appended to the URL of a very important page on the Crazy Egg website — the Welcome Page.
The Welcome Page is where visitors land when they open an account and start the free trial of the Crazy Egg software. Our goal is to increase the number of visitors that see this page because it means we have increased the number of people that are taking a trial of the software.
The trouble is that Google Analytics doesn’t see the Welcome Page as one page. No sir. In fact, every time a site visitor lands on our Welcome Page Google Analytics logs it as a new page.
How Google Analytics Logs a Pageview
Google Analytics strips away the domain (in this case crazyegg.com) and looks at the remaining portions of the URL string to determine a unique page.
As a result, dynamic URL parameters create a unique page in the eyes of Google Analytics each and every time.
is not the same as
Because the txn and tl parameter are different, these URL’s will be logged as unique pages. As a result our Google Analytics reports are cluttered with thousands of unique pageviews that don’t really exist and provide no value to our business.
NOTE: It’s possible that your URL parameters do provide insightful information to you. If, for example, one of your URL parameters contains product numbers, pricing or discount codes you may want Google Analytics to log these as unique pageviews.
How To Remove Those Pesky URL Parameters From Your Reports
You can get them cleaned up by adjusting the settings in your Google Analytics profile settings.
Here’s just a sliver of our Goal URL’s report in our main Google Analytics profile,
Notice how each conversion creates a new URL in this profile.
But you might want to see a set of reports where these ugly URL parameters are removed.
You may want to set up a new Google Analytics profile. You’ll want to do this if you are afraid of messing up the data you already have in Google Analytics or if you want to have one set of reports that contains URL parameters and another that doesn’t.
In the Profile Settings of your new or existing Google Analytics profile add a comma separated list of the URL parameters you want Google Analytics to ignore.
From my example the URL parameters are:
Save your changes and wait for some data to pour into your new or newly updated profile.
Here’s what we see when we look at the Goal URL’s report with the URL parameters removed from the profile,
Pretty neat, eh?
Don’t forget that Google Analytics does not reprocess data. In other words, you won’t be able to remove parameters from previous data — only data going forward will have your URL parameters removed.