Advanced Implementation Managing Data from Multiple Websites
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 3 Advanced Implementation Managing Data from Multiple Websites Abstract makes sense from an internal staff perspective; the web team is evaluating the parts of the web presence that The basic Google Analytics installation is one tracking code they build, the ILS administrator may track and assess for each website. This method neatly stores and reports use of the catalog, and reference and instruction staff data from each website in its own separate silo, but makes want to know how their LibGuides are being used. it difficult for libraries to understand how website users However, this doesn’t reflect the reality of our traverse and interact with the various websites libraries customers’ experiences; even though the back end of maintain. Chapter 3 of Library Technology Reports (vol. all of these things reside in separate systems, the end- 49, no. 4) “Maximizing Google Analytics: Six High-Impact user experience served up by this mishmash of library Practices” introduces the high-impact practice of tracking products in a web browser ought to be as seamless as separate subdirectories, subdomains, and domains all in possible. Assuming that your institution has adopted a one Google Analytics profile. Learn the benefits and draw- user-centric data collection model—you have, right?— backs to tracking multiple websites and how to customize you may want to reconsider simply assigning sepa- your Google Analytics tracking code to effectively monitor rate profiles to separate tools. It’s important to think and report your entire library’s website usage data. about how all of these web presences work together and whether they’re all part of the same user expe- ibrary websites are strange beasts. They are often a rience or not. Think about your audiences and how complex blend of one or more websites created in- the sites are intended to be used. If they are intended house, vendor catalogs, discovery layer services, for different purposes or audiences, it might not make June 2013 L blogs, social media presences—the list could go on. sense to track them together. In this chapter, we’ll While you may own or have been given access to your talk about the rationale for deciding when and how own domain (yourlibrary.org), you may have other to track multiple sites together (or not!) and then take web presences that are hosted in different subdomains a look at how to accomplish this with some creative (catalog.yourlibrary.org or blog.yourlibrary.org) or adjustments to your JavaScript tracking code and your on a completely separate domain. A website that is Google Analytics account settings. alatechsource.org hosted on a vendor’s web server, such as the popular LibGuides, will typically be on a domain separate from your library’s website. You may think that you could Concepts to Know just set up your main website, your online catalog, your discovery layer tool, your LibGuides instance, and all Since this is a slightly more advanced topic, please of the other sites that comprise your complete library make sure you understand the following terms before web presence with their own tracking numbers in their diving in: own profiles, and you’d be absolutely right. In fact, the Google Analytics default is using one web property • Domain. The base or smallest part of a URL, e.g., Library Technology ReportsLibrary Technology ID (i.e., UA-XXXXXX-X) per domain. Many libraries yourlibrary.org or yourcollege.edu. (Technically configure their multiple web tools in this way, which speaking, a domain name is just a language-based, 16 Maximizing Google Analytics: Six High-Impact Practices Tabatha Farney and Nina McHale memorable way to get to a web server, whose true automatically generated for the main domain and address is one or more IP numbers.) another for the subdomain. This inflates the reports • Subdomain. A “child” of a domain, e.g., kids Visits and Visitor Count, which are critical to almost .yourlibrary.org or library.yourcollege.edu. Sub- all the reports in Google Analytics. Additionally, the domains are commonly separate entities or sites. individual sites—in this case, the main site and the As in the second example here, your library web- subdomain—are shown in reports as referrers to one site may itself be a subdomain of a parent institu- another. This can be particularly frustrating because tion or entity. it cannot show the actual navigation summary, from • Subdirectory. A directory inside your domain, e.g., the user entering the main site to navigating to the yourlibrary.org/kids or yourcollege.edu/library. blog on the subdomain: all you can infer is that the As with subdomains, it’s common for library web- visitor was referred to the blog from the library’s sites to be contained in a subdirectory of a parent main site. institution, even if it’s separately hosted, devel- With cross-domain tracking, you will use the same oped, and maintained. tracking code with a few additional customizations to • Google Analytics tracking cookie. Cookies are the script to track all those separate sites as one proper small text files that are placed in a visitor’s web site. We’ll take a look at some examples of when and browser when the visitor accesses a website. how you would want to combine or separate to track These cookies are designed to collect and send across multiple domains or subdomains and then data about the users’ interactions on that website review the tweaks required to your Google Analyt- to a web server. The Google Analytics tracking ics tracking setup to implement your ideal tracking script uses a cookie to determine unique visitors, scenario. new versus returning visitors, how often visitors return to the site, and various other essential data points. There are different types of cookies, but Traditional Tracking: Using One Web Google Analytics uses a first-party cookie, which Property ID per Domain collects data only from the single domain that it was set to track. Essentially, this means the cookie Using one web property ID per domain is the default cannot combine data from multiple domains even method of tracking sites in Google Analytics, where if you own or control them—at least, not without each web presence is tracked in its own profile—so some customizations to the tracking script that the library website, catalog, blog, and any other web alter how the cookie collects data.1 What does presence you manage are each given its own pro- this mean for libraries? Any library wanting to file and unique tracking code. A site that has sev- track multiple domains or subdomains—such as eral related subdomains, like a blog site that con- a library’s website, catalog, and blog—in one pro- tains multiple blogs (blog1.yourlibrary.org, blog2 file must first implement cross-domain tracking. .yourlibrary.org, etc.) could be tracked using one Cross-domain tracking is the process of tracking tracking code, but this approach is not recommended different websites (domains and subdomains) by because it generates the same problems as using the altering the default cookie settings to combine and same tracking code on separate domains discussed ReportsLibrary Technology report data from each of those identified sites in earlier. We’ll discuss the best practices for subdomain one profile. tracking later in the chapter. The primary benefit of tracking one profile per domain is that the data is in a single profile, allowing Can’t I Just Use the Same Tracking you to easily see the total use of the individual websites Code on Two or More Sites? without having to create additional segments or filters. Each site can have its own set of unique goals, custom Applying the same web property ID to all of your sites in variables, and profile settings. However, there are sev- which you have implemented Google Analytics would eral drawbacks to this approach. First, all that data is in alatechsource.org indeed result in data being collected from all of them, separate reports, so if you ever needed to report on mul- but without some modifications to the tracking code tiple sites, you would have extra work to combine the itself, your data will be badly skewed. For example, necessary data. Additional steps are required to track a visitor entering the main library site (yourlibrary. how those sites interact with each other. By default, org) and then accessing a subdomain of that site (blog Google Analytics will track interactions between the .yourlibrary.org) that uses the same uncustomized sites as referrals found in the Traffic Sources reports. June 2013 tracking code will be counted as two separate visi- Libraries must set up a method to track exits to these tors. Once the visitor navigates to the subdomain, other sites to accurately distinguish proper exits from the session on the main site is ended and a new ses- bounces—it will show where users are navigating off sion on the subdomain is begun because a cookie is a site in order to go to another library-managed site 17 Maximizing Google Analytics: Six High-Impact Practices Tabatha Farney and Nina McHale rather than just leaving a site. Finally, you cannot track goals across the separate domains. (function() { If you opt to track all sites separately, you still can var ga = document. separate some of the site’s data into different filtered createElement('script'); profiles. For example, a large library that contains many ga.type = 'text/javascript'; branches or departments with each branch’s website ga.async = true; in a subdirectory (e.g., www.yourlibrary.edu/english ga.src = ('https:' == document. library/ or www.yourlibrary.edu/engineeringlibrary/) location.protocol ? 'https:// of the main library site can track the entire site’s pres- ssl' : 'http://www') + ence (www.yourlibrary.edu) with one tracking code to '.google-analytics.com/ga.js'; create a master profile and then create filtered profiles var s = document.