ltr: Vol. 47 Issue 5: p. 17
Chapter 3: Installing and Configuring Google Analytics
Kate Marek

Abstract

This chapter of Using Web Analytics in the Library provides a step-by-step guide to installing and configuring a web analytics platform using Google Analytics—one of the most popular platforms—as an example.


This chapter will use Google Analytics (GA) as the illustration and model for a web analytics implementation in your library. I will walk step-by-step through the initial registration and setup, and will look at some specific aspects of configuration that can be useful for library website analysis.


Getting Started

The initial registration and start-up with Google Analytics (GA) is extremely easy. All you need for your first step is to set up a basic account with Google. (Since setting up a Gmail account is just one activity once you have that basic Google account, you do not need to have Gmail to get started with Google Analytics.)

When you register with GA, you can use any e-mail address. Keep in mind that the e-mail account you use for you library's Google account registration becomes the login that you use to register for GA and will then be associated with your library's analytics account and the reports. Thus, for this purpose use an e-mail account specifically associated with your library rather than your personal account. In my example, I use webmaster@mylibrarary.org (see figures 1 and 2). You are, of course, still free to create additional personal and professional accounts with Google.

Once you have created an account, you are ready to register for GA. In the GA support material you will see references to AdWords accounts; this fee-based service from Google is associated with online advertising. The installation process of GA differs depending on whether or not you subscribe to the AdWords service. The GA versions are the same, but the free version (called the standalone version) is limited to five million page views per month, or approximately three thousand visits per day.1 Larger libraries will want to consider this as you consider analytics options. If you do decide to use AdWords, check the GA documentation for special instructions for getting started and for installation.

The following examples are based on the standalone version of GA (see figure 3).

Google Analytics signup

www.google.com/analytics/sign_up.html

At this stage, you are ready to begin the signup process. Make sure you select the proper geographic region (found in the upper right-hand corner under the phrase Change Language), as that affects not only the language but also the appropriate terms of service.

Once you are registered, the system will welcome you and will generate a snippet of code specific to your website. This unique page tag, the Google Analytics Tracking Code (GATC), is the key to making GA work (see figure 4). Copy and paste this same GATC directly into the source code of every page in your website.

Currently, the recommendation is to place the GATC immediately before the </head> tag (figure 5). This is called the asynchronous snippet.

The practice up until recently was to place the code just above the </body> tag, and if you are already using GA, your pages probably reflect that practice. GA refers to the previous placement as the “traditional” GATC placement. The current GA recommendation is that you update your code to the asynchronous snippet by locating the Edit link next to your profile on the Analytics Settings page, retrieving the asynchronous code, and making the placement changes throughout your site. The rationale for the new asynchronous snippet and its placement is that by placing the code in the <head>, browsers will continue to render the visitor's webpage as the GATC loads, thus more quickly capturing the data from that visit. With the traditional placement immediately above the </body> tag, the page load itself is not delayed, but data capture will not kick in as quickly. See the Google Analytics Help article “Set Up the Tracking Code (Asynchronous)” online for more information on the GATC and its current placement. The webpage “Asynchronous Tracking Usage Guide” compares the asynchronous and traditional snippets and how they work.

Set Up the Tracking Code (Asynchronous)

www.google.com/support/analytics/bin/answer.py?answer=174090

Asynchronous Tracking Usage Guide

http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html

Explaining the GATC

As Brian Clifton explains in his book Advanced Web Metrics with Google Analytics, there are three components of the GA tracking code:2

  • The call of a master JavaScript file from Google servers. This master file, ga.js, is exactly the same for all GA accounts. It contains the code necessary for data collection and is cached by the visitor's browser either from a previous visit to your site or to a visit to another site which also uses GA. This portion of the GATC also includes code detecting whether to load ga.js as a standard request or via an encrypted protocol for anysecure areas of your site.
  • An individual account ID with the format UA-XXXX-YY. This is the portion of the page tag that is unique to your account. If not used exactly as quoted to you in the setup window, your data will go to another account. Since the Web operates in an open source environment, your unique ID will be visible to anyone who views your HTML source code. To protect your data, Clifton strongly suggests that you set up a custom profile filter that tells the program to capture only your website's traffic in the GA results.3 Thus, if someone either makes a mistake or deliberately copies your GATC and pastes it into their own webpages, GA will still report only traffic to mylibrary.org and any directories and subdomains you specify. Setting up filters will be explained in more detail later in this chapter.
  • The call of the JavaScript routine _track Paveview(). Clifton calls this the “workhorse” of GA.4 This part of the code collects the data, including the URL of your visitor's pageview, the browser type, language setting, and timestamp. Cookies are also read and set, and then communicated back to the Google servers.

There are many modifications and customizations to the GATC available according to your individual needs. Check the GA online documentation as well as support materials such as Brian Clifton's book for additional technical details about GATC setup. In addition, if you are using a content management system (CMS) such as Drupal or Joomla!, check its documentation for GATC installation instructions.

Testing Your GATC

Remember that your Google Analytics Tracking Code must be pasted on all of your pages in order for the program to capture complete data across your website. You should begin to see results in your account views within 24 hours of your page tag installation.

Brian Clifton stresses the importance of accurately tagging all the pages in your site, noting that a page not tagged is a page not counted. “Missing tags equals no data for those pageviews.”5 Aim for 98 percent or more of your pages being tagged with the accurate GATC. Depending on your web server, you may be able to find loadable modules that will help with automatic page tagging. For example, Clifton suggests mod_layout for Apache servers, available at TangentOrg.6 If you are using a CMS, watch out for pages that do not use your standard template and be sure they are tagged along with the rest of your pages.

TangentOrg

http://tangent.org

To see data capture results, log in to your account page. In the meantime, identify the Check Status section at the top of the Profile Settings page. Once the system detects that your code is in place, you should see a green check in that status area (figure 6).

You can also view reports from your main screen and watch for new results to populate the forms within the first day of installation. If you are unsure if you've placed the code correctly and you are using a web authoring system such as Dreamweaver, make sure that you did not place the GATC in the Design window of that program's interface; double check your HTML, and make sure the GATC does not display on your pages via your browsers.


Configuration Best Practices
Creating Profiles

When you sign up for a GA account, a profile is automatically created; at least one profile is required per account in order to view data collected from your visitors. In many cases, libraries may want to keep a single profile for data collection and reporting. There are some instances, though, when separate profiles would be desirable. An example typically used in the literature is to create separate profiles for website visitors from the United States and for European visitors. Another example of separate profiles is when the organization has different departments or divisions, and separate reports can be beneficial when those departments have very different goals and responsibilities. A possible library application would be a large, multicampus university where each campus library would need to generate its own reports.

The downside for most libraries to creating separate profiles is that no aggregate reports are available for those separate profiles. See chapter 4 for a more detailed discussion of GA reports.

Setting Goals

One of the most important things you can do when planning for website analysis, both from a big-picture, organizational perspective and from the perspective of your website's specific role within the library, is to set goals. You do this first conceptually, based on your library's mission, and then technically within GA.

As mentioned in chapter 1, a key part of website planning is first knowing its role in the overall mission of the library. What is the purpose of your website? Why does it exist? If your website has been clearly defined by the library as its digital branch, what exactly does that mean for design and content? How will you evaluate its success?

A goal as set within GA is a key strategy that helps accomplish your overall website priorities.

For libraries, setting goals within GA becomes easier once you begin to consider some examples.

  • An academic library's overall mission is to support education through the provision of informational resources. One website goal is to increase use of instructional support, both through face-to-face instruction sessions and through student use of online instruction tutorials. You can identify the following goals:
    • Online registrations for face-to-face sessions
    • Page views and time in page for your online tutorials
    • LibGuide page views
  • A goal for a public library could be to increase the page views and time on page for the director's blog.

Remember when analyzing success with these goals, you will start with a baseline figure that you capture at a certain point in time. Then, make assessments in coordination with your knowledge of what else is going on in the library: is it a peak instructional time in the library? Is there a big concurrent marketing plan that includes promoting the director's blog?

Conversions

A conversion, then, is when the visitor completes the action that comprises your goal. Looking again at the goal of increasing the use of online tutorials, you may have set your goal as a certain number of minutes on specific pages that include the tutorials. A conversion is tallied when a visitor completes that defined action. Thus, your success is measured by the number of conversions for each goal.

Funnels

A funnel is a specific, predefined path toward a conversion. This is another metric that is most appropriate for e-commerce, where an efficient step-by-step path toward the moment of purchase is critical to potential profit. The funnel visualization will show the analyst where the customer abandons his or her cart, and thus that's the area that the designer knows to fix. (Think of the potential airline passenger who ditches the ticket purchase at the last minute because the credit card form will accept only American Express.) Using a predefined funnel can be helpful in certain situations for libraries as well. For example, if one of your key goals is to increase usage of your digital collection, you may try to streamline the menu system that leads to that collection. Setting up a funnel path and then analyzing the visitors’ paths can be very useful toward taking action for continuous improvement of the process.


Setting Up Goals and Funnels in Google Analytics

Find the Goals section in the GA Administration basic left-hand side menu (figure 7).

Follow the link on the next welcome screen to Set Up Goals and Funnels (figure 8).

Select Add Goal (figure 9).

Add a goal title. Then select the type of goal from URL Destination, Time on Site, or Pages/Visit. The URL Destination goal would be used when you are shooting for a higher number of visits for the director's blog. The Pages/Visits would be a goal where you would like to go over a certain number of pages viewed per visit, so 15 might be an appropriate threshold for this category. In the example in figure 10, I have used Time on Site as a goal for the online instruction session, with a five-minute time threshold. (I'm assuming the instruction videos are five minutes long.) I selected Time on Site rather than URL Destination because I don't want to know just that the students are going to the page, but rather that they are viewing the entire tutorial. (For information about tracking use of Shockwave/Flash tutorials, see chapter 4.)

If you would like to work with Funnel Visualization, set up the funnel path when you identify your goal. Find the report area under the expanded Goals menu (figure 11).

Goal conversions will be displayed in graph form, also through the expanded Goals menu. Each profile in GA can be configured for up to 20 goals. You can expand this number, however, by using wildcards in your goal settings, such as specifying *.pdf rather than one individual PDF file name in the URL Destination. And again to stress a caveat: all data, including goal conversions, should be analyzed in collaboration with a variety of relevant players in the library structure. The more people, the greater the potential for insights; the more insights, the more potential actions toward continual improvement.

Monetizing Goals

One suggestion from the primarily e-commerce oriented analytics literature is that non e-commerce sites consider monetizing goals. This would involve assigning a dollar figure to each conversion. You will notice in figure 10 that an opportunity does exist at the bottom of the goal setup screen to enter a Goal Value. This might be an interesting research project, particularly for libraries where return on investment (ROI) discussions have taken on critical importance. Assigning a dollar value to each conversion, such as each program registration or each completed ILL request, could become a key part of your budget justification. For more information on monetizing goals, see Clifton's book Advanced Web Metrics with Google Analytics. Avinash Kaushik also blogs about this issue frequently, and I would suggest a basic Web search for various articles on monetizing non–e-commerce website goals.

Creating Filters

A filter is applied to your incoming data such that you can create a specific accurate report. For example, you can exclude specific information or IP addresses, or report from a specific subdomain or directory. GA has predefined filters (such as the two just listed), as well as custom options.7

For example, one way to eliminate “noise” through the use of profile filters is to eliminate data counting visits from your own employees or from library computers that automatically open to your home page. This you can do by selecting individual IP numbers or ranges of IP numbers and filtering out that data capture.

Brian Clifton lists two common profile filters that are relevant to libraries:8

  • Include only your website's traffic. Clifton recommends applying this to all your profiles, if indeed you have more than one profile. As discussed earlier, people could use your unique GATC snippet either by mistake or deliberately. This could cause corruption of your data unless you filter in only data from mylibrary.org.
  • Exclude certain known visitors. Examples of known visitors are your own employees and public access computers that open to your home page. These visitors will create a high number of visits that will skew your metrics and your conversion rates. (Note: for filtering a range of IP addresses, see the article “How Do I Exclude Traffic from a Range of IP Addresses?”)

How Do I Exclude Traffic from a Range of IP Addresses?

http://tinyurl.com/googleanalytics-ip

To create a filter, click Edit next to the profile name where you'd like to add the filter. Then scroll down to the Add New Filter for Profile link. Give the new filter a name, complete the remaining inputs, and Save Changes. Figure 12 shows the settings for adding a filter to include only your website traffic.

The Google Analytics Help screens provide clear instructions for setting filters, including the method used to exclude traffic from a domain or an IP address or range of addresses, and to include only traffic to a subdirectory. See “How Do I Create a Predefined Filter?” For a more in-depth study of filters, see also Brian Clifton's book, Advanced Web Metrics with Google Analytics.

How Do I Create a Predefined Filter?

www.google.com/support/analytics/bin/answer.py?answer=55496.

That's the basics of the GA setup. There is a great deal more sophistication and customization available, but this will give you a good start. Remember to use Brian Clifton's book and the Google Analytics Help (as well as its Conversion University website found at www.google.com/support/conversionuniversity/) for more details and more technical information. Chapter 4 will look more specifically at the various ways you can sift, parse, highlight, and segment data for reports to help you find actionable insights.


Resources

Clifton, Brian. Advanced Web Metrics with Google Analytics. 2nd ed. Indianapolis, IN: Wiley Publishing, 2010.

Google Analytics. Filters Help Pages. www.google.com/support/analytics/bin/topic.py?topic=11091 and www.google.com/support/analytics/bin/answer.py?answer=55496. Accessed March 31, 2011.

Google Analytics. GATC Help Pages. www.google.com/support/analytics/bin/answer.py?answer=174090 and http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html. Accessed March 31, 2011.


Notes
Brian Clifton, Advanced Web Metrics with Google Analytics, 2nd ed. (Indianapolis, IN: Wiley Publishing, 2010), 132.
Ibid., 134–136.
Ibid., 238.
Ibid., 135.
Ibid., 26.
Ibid., 137.
Google Analytics Help, “Filters,” www.google.com/support/analytics/bin/topic.py?topic=11091 (accessed March 21, 2011).
Clifton, Advanced Web Metrics, 238.

Figures

[Figure ID: fig1]
Figure 1 

Signing up for a Google account.



[Figure ID: fig2]
Figure 2 

Google account confirmation.



[Figure ID: fig3]
Figure 3 

Google Analytics signup without an AdWords account.



[Figure ID: fig4]
Figure 4 

Google Analytics Tracking Code (GATC), sent upon signup.



[Figure ID: fig5]
Figure 5 

GATC placement in HTML code.



[Figure ID: fig6]
Figure 6 

The checkmark lets you know the program is active. The “View report” link takes you to your Dashboard and your GA reports.



[Figure ID: fig7]
Figure 7 

Goals section from the left-hand GA menu.



[Figure ID: fig8]
Figure 8 

Link to Set up goals and funnels.



[Figure ID: fig9]
Figure 9 

Adding a goal or a filter.



[Figure ID: fig10]
Figure 10 

Add arrow to Goal Name, type of goal, and specific minutes of this goal.



[Figure ID: fig11]
Figure 11 

Funnel Visualization.



[Figure ID: fig12]
Figure 12 

Create a new filter.



Article Categories:
  • Information Science
  • Library Science

Refbacks

  • There are currently no refbacks.


Published by ALA TechSource, an imprint of the American Library Association.
Copyright Statement | ALA Privacy Policy