Configure Google Analytics for better insights

Google Analytics data is only valuable when it leads to insight and maps to organizational goals.

And it’s really difficult to derive insight and measure performance when your Google Analytics data is dirty. Every Google Analytics configuration, especially for SharePoint, should follow these steps in order to start off on the right foot.

Caution: If you don’t have your core Views set up in your Google Analytics then you should do that prior to applying filters.

What is dirty data?

There are a number of things that mess up good data but the two that we’ll focus on here are case-sensitivity and hidden search terms. Every page on your site is accessed by a URL (the thing that goes in the address bar at the top of your browser) and this can be typed or copy-and-pasted in, or clicked on from another page. We’re at the mercy of whoever created the link or is typing in the address bar to get it right. This brings us to our first tip.

Tip #1: Convert URLs to lowercase filter

Most content management systems (CMS), including SharePoint, interpret uppercase and lowercase variations of a URL as the same thing and take you to the right page. Google Analytics is case-sensitive so it records each variation as a different page.

To a CMS, these three URLs are the same and point to the same page:

  • http://www.acme.com/Products/Pages/Smart-Watch.aspx
  • http://www.acme.com/PRODUCTS/pages/smart-watch.aspx
  • http://www.acme.com/ProDUCts/PaGeS/SmArT-WaTcH.AsPx

To Google Analytics, each example is treated as a unique URL and is interpreted as a different entry in the analytics log. To determine Unique Page Views of your smart watch product, for example, you need to identify and combine the totals for each one of these entries and redo the calculations manually. (And now think about doing that for every page in your site!)

We can improve the quality of our data by instructing Google Analytics to convert all URLs to the same case before doing its tallies. This improvement makes your Google Analytics data more useful and actionable because it’s easier to understand the data and it's easier to do meaningful analysis on it.

Here’s how:

Steps to convert URLs to lowercase

lowercase URLS, Google Analytics, Habanero

  1. Go to the Admin area in Google Analytics
  2. Select the Account, Property, and View where you want to convert search terms
  3. Under the View options, click Filters
  4. Click + New Filter
  5. Choose Create new filter
  6. Name the filter: Lowercase URLs
  7. Choose Filter Type: Custom Filter
  8. Choose Lowercase
  9. Set Filter Field to Request URI (under Content and Traffic)
  10. Save the filter

Tip #2: Convert search terms to lowercase filter

Unfortunately, like the example above, Google Analytics interprets each variation of UPPERCASE and lowercase letters in the term as a unique entry. For analysis purposes, because search is typically case-insenstive, we prefer to look at the terms and not worry about how it was typed (unless it’s a misspelling but that’s a separate topic).

So, regardless of whether a person enters “smart watch‚” “Smart Watch‚” or “SMART WATCH‚” we want to see that in Google Analytics as one term: smart watch.

Google Analytics can be instructed to convert all search terms to lowercase before processing and that’ll make our job of analyzing the data much easier; we can focus more clearly on the terms and topics.

Steps to convert search terms to lowercase

Habanero, search terms, Google Analytics

  1. Go to the Admin area in Google Analytics
  2. Select the Account, Property, and View where you want to convert search terms
  3. Under the View options, click Filters
  4. Click + New Filter
  5. Choose Create new filter
  6. Name the filter: Lowercase search terms
  7. Choose Filter Type: Custom Filter
  8. Choose Lowercase
  9. Set Filter Field to Search Term (under Content and Traffic)
  10. Save the filter

Tip #3: Enable site search tracking

Site Search shows the terms people use when searching within your site–not from Google, Bing, Yahoo, etc.–and can be analyzed to identify what information:

  • is commonly being sought on your site,
  • is missing and might need to be added, and
  • people are having difficulty locating on your site.

To begin making use of this data, we need to understand how it ends up in Google Analytics.

For a CMS like SharePoint, when a person types "vacation policy" into the search box, it uses query string parameters (the stuff after the '?' in the URL) to track and pass search terms, like this:

http://www.acme.com/Search/Pages/results.aspx?k=vacation%20policy

So, for each search term, a different URL is sent to Google Analytics with a pageview. By default, Google Analytics simply adds an entry for each URL that your site search creates so you might see something like this in your analytics data:

  • http://www.acme.com/SearchSite/Pages/results.aspx?k=smart%20watch
  • http://www.acme.com/SearchSite/Pages/results.aspx?k=SMART%20WATCH
  • http://www.acme.com/SearchSite/Pages/results.aspx?k=watches
  • http://www.acme.com/SearchSite/Pages/results.aspx?k=Wearables
  • http://www.acme.com/SearchSite/Pages/results.aspx?k=connected%20devices

Here, the terms people have searched by are “smart watch‚” “SMART WATCH‚” “watches‚” “Wearables‚” and “connected devices.” A simple setting in the Admin section can improve your analysis of Search terms dramatically.

Enable Site Search Tracking to have search terms automatically extracted from URLs and have them show up in the Site Search Tracking section of Google Analytics for easier analysis.

Steps to enable Site Search Tracking

site search tracking settings, Google Analytics, Habanero

  1. Go to the Admin area in Google Analytics
  2. Select the Account, Property, and View where you want to enable Site Search Tracking
  3. Under the View options, click View Settings
  4. Locate Site Search Settings
  5. Turn Site Search Tracking ON
  6. Enter the query string parameter(s) that are used by your CMS for search terms. In SharePoint, this value is lowercase 'k'.
  7. Finally, to get a better sense of your results page usage (without the terms in the URL), check Strip query parameters out of the URL
  8. Save the settings

Summary

True insight is often buried under dirty data. We can improve our ability to achieve insight by adding Google Analytics filters to reduce the noise created by case-sensitivity and by enabling Site Search Tracking to allow for faster analysis of key search terms from your site. These simple, but often overlooked, configurations give cleaner data and better insights.

Stories say it best.

Are you ready to make your workplace awesome? We're keen to hear what you have in mind.

Interested in learning more about the work we do?

Explore our culture and transformation services.

Our commitment to reconciliation

Learn how Habanero is responding to the Truth and Reconciliation Calls to Action as a settler-owned company operating on Indigenous territories across what is now called Canada.

Read about our commitment