Using Google Analytics Filters to Remove Session IDs from URLs

One of the great things about working online is that you can track and monitor virtually anything and everything. That is of course, as long as you have some sort of analytics package set up. We use Google Analytics for most of our clients. It a pretty powerful solution (when used correctly), and of course has the added advantage of being completely free… and we all like free, right?

Google Analytics is pretty easy to set up – you simply need to insert a small snippet of code into every page of your website. However, there are certain instances whereupon URL structure can adversely affect the data which you get out of the package.

For example, if you want to monitor conversions through your website via Google Analytics, the easiest way is to set up goals and funnels.

Goals are very easy to set up – all you need to do is insert the URL which all users who complete the goal hit. For example – if you were looking to track purchases, you’d probably use the ‘thank you’ page URL which users hit once the goal is completed.

Funnels are simply the steps a user has to go through in order to complete a goal. So, again taking our purchase example; step one might be a page where the user completes their name and address; step two might be where they insert their payment details; step three might be the confirm purchase page; and step four might be the thank you for purchasing page.

All of this sounds simple enough; however, you are reliant on all users hitting the same pages. Which, if a site uses Session IDs can be a problem…

We came across one such example a couple of weeks ago. We won ourselves a lovely new insurance client. Like many they were using a white label quote engine. Not unusually, the quote engine utilised dynamically generated session IDs. Ordinarily this isn’t a problem as the URLs are typically configured as follows:

www.website.co.uk/quote-form/step-one.html?uniquesessionid

These types of session IDs are simply ignored by Google Analytics, and as such you can get aggregated data on all of the users who viewed www.website.co.uk/quote-form/step-one.html – this means you can track conversions by setting up goals and funnels as normal.

However on this particular site the URLs were configured as follows:

www.website.co.uk/quote-form/uniquesessionid/step-one.html

As such a new URL was being dynamically generated for each user. This was causing problems in Google Analytics, making it impossible to track conversions via goals and funnels in the usual way.

However, there’s a nice little work around – by using a filter you can solve the problem:

Let’s use this URL as an example:  www.website.co.uk/quote-form/uniquesessionid/step-one.html

  1. Login to your analytics account, however rather than clicking on ‘view reports’ click on ‘edit’.
  2. You’ll be taken to your profile setting page
  3. Click on add filter
  4. Give your new filter an appropriate name
  5. Select ‘Custom filter’
  6. Select ‘Search and Replace’
  7. From the Filter Field drop down list, select Request URI
  8. In the Search String box insert:       quote-form/.*/
  9. In the Replace String box insert:     quote-form/
  10. Select ‘No’ for Case Sensitive
  11. Hit ‘Save Changes’

Effectively this will filter out all of the Session IDs from the URLs – so rather than reporting on individual user’s URLs you will be able to view the data in aggregate, and set up goals and funnels as usual. Smart, huh?

Share and Enjoy:
  • Digg
  • Sphinn
  • Twitter
  • RSS
  • StumbleUpon
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]