Capturing Search Terms using Google Analytics

If you use Google Analytics, do you ever wonder what the “Search Terms” in the dashboard could mean? One library-centric (and probably highly contentious) use is to capture search terms used in online databases. In the broad sense, these databases are any search entity you may have such as journal finders, discovery layers, ILS catalogs, etc. If you can add Google Analytics code to the website and the search terms are retained in the url, you can almost definitely capture search terms. (Note: there are most definitely other ways to gather search terms, but I’m sticking to this version for now).

In your Google Analytics account, go to the Admin for the account/website you want to capture search terms for. Under View, click View Settings. This is where you can adjust the basic settings regarding what you want captured. You’ll need:

  • the website’s base url (most likely everything before a question mark)
  • your current timezone
  • parameters you want to exclude like session id (look at the url and/or any documention to determine what parameters you don’t want to be analyzing)
  • turn “Site search Tracking” on
  • the query parameter(s) (again investigate that url for your search term and enter the identifier used to signify what is the search term)

Don’t forget to click Save.

Enjoy watching the search terms roll in and perhaps you’ll discover the need to purchase items in a different subject area or the need make it easier to find certain resources.


Tracking outbound urls on the library’s homepage

After a long hiatus from tinkering with library technology due to chairing a classroom renovation committee and doing the backend work of a book inventory project, I finally got to some of my sidelined to-do lists.

Google Analytics (GA) is one popular tool used for tracking website usage, however, the default setup only tracks usage within the domain listed in the settings. For a library with lots of links to external resources like catalogs, journal finders, databases, etc. the default setting can feel lacking. It’s also only so interesting to know x number of people visited your site, spent at most a few minutes on your homepage and left. Event Tracking solves that dilemma.

At first, Event Tracking looks like a lot of coding but it doesn’t have to be. Google Developers pages so nicely directed me to some GA code on GitHub called autotrack. By adding the javascript file to your webserver and a few lines of code to your already existing GA code on your website . If you don’t already have GA, GA gives you the basic code to insert when setting up a site and the additional autotrack lines get inserted into that.

Right now, I’ve added outboundFormTracker to track our LibAnswer search box, eventTracker to track our EDS search box (it wasn’t acting like a form for autotrack, so I did have to add a small amount of code to the submit input item), outboundLinkTracker to track everything else. So far, the heaviest usage from our homepage is EDS and our database list. I look forward to seeing what is and isn’t really used over the summer and into the fall semester.