Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to I combine Page-views for a URL when they have different query strings in Google Analytics?

I am trying to do some reporting on page views on a site and the results are being listed like the following:

  • www.example.com/directory/ - 100 views
  • www.example.com/directory/?id=123456 - 10 views
  • www.example.com/directory/?id=987654 - 5 views

What filter do I need to create to views the results as:

  • www.example.com/directory/ - 100 views
  • www.example.com/directory/?id=* - 15 views

Thanks in advance

like image 906
rob_lowe Avatar asked Oct 25 '13 15:10

rob_lowe


2 Answers

Yes, getting historical grouped together is going to mean using something like Google Docs, Excel, Tableau Software, Analytics Canvas, etc.

Moving forward...

One of the simplest ways of keeping things grouped in GA is to set up an advanced profile filter. You'll want to use this with a new profile; keeping a "raw" or "empty" profile is highly advisable for when you actually want to look at those individual URLs.

That said, here's a filter pattern that should work for you:

Go to Admin > Filters (under the View Column)

+ New Filter > Create new Filter > Name it

Filter Type = Custom filter > Advanced

Here's the pattern:

Field A: www\.example\.com\/directory\/\?id=.+
Output To: www\.example\.com\/directory\/\?id=\*

enter image description here

like image 179
Drewdavid Avatar answered Oct 01 '22 18:10

Drewdavid


Another way to aggregate the same URI with multiple query strings is to change the primary dimension to 'Page Title' under Behavior > Site Content > All Pages.

like image 35
Kent Dagnall Avatar answered Oct 01 '22 19:10

Kent Dagnall