When working on complex websites, we often end up with tons of URLs that are, in reality, the same page with different query-string arguments.

Why is this important?

  1. Filter out arguments that are creating unnecessary duplicates
  2. Reduce the number of distinct entries in reports and the risks of breaking the number of uniques imposed by most tools
  3. Increase the accuracy of Page Views
  4. Identify rogue query string parameters and wrong arguments (as well as those with mixed upper/lowercase which are likely also considered as distinct ones)

The solution

I love Analytics Canvas, so I thought – why not try to do a Query String analysis using it! The original idea comes from Peter O’Neill, who offers an Excel spreadsheet with macros to do this.

The algorithm looks like this:

  • Fetch data from GA: only paths with URLs, sorted by descending unique page views
  • Split the URL to get only the Query String part
  • Further split the query string to extract value-pairs (up to 5 arguments in this case) and put them in a new column named “arg”
  • Combine everything back but keep only the “arg” column
  • Filter out rows where “arg” is empty (i.e. there were less than 5 arguments)
  • Split out the “arg” column into “var=value” pairs and keep only the “var” column
  • Combine duplicate “var” and create a new column with a total of occurences of each one
  • Sort in alphabetical order
  • Store into Excel
  • Voilà!

 

It worked on a pretty complex website which had nearly 30k URLs with query string parameters and ended up with 195 distinct arguments!

Here’s how the results looks like:

ParameterCount
transit9960
page1463
sLang1454

Once equipped with this information, we can adequately configure Google Analytics by filtering out unnecessary parameters and improve the overall quality of our analytics.

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.