Skip to main content
OCLC Support

Universal Analytics in CONTENTdm

Learn how to use Google Universal Analytics to evaluate the usage of your CONTENTdm collections.

Learn how to use Google's Universal Analytics in CONTENTdm to answer some common questions about how your CONTENTdm collections are being used. After reading this document, you will find it easier to use Google Analytics to answer further questions you may have about usage of your CONTENTdm collections.

This document assumes no prior familiarity with Google Analytics, or with web analytics in general. It does assume familiarity with CONTENTdm, however; if you are new to CONTENTdm, please refer to the Getting Started docs.


In order to use Google Analytics, you first need a Google account (which you can use for any or all of Google's products), then an Analytics account under that Google account. We recommend creating a Google account and an Analytics account specifically for your work with CONTENTdm — not adding new products and sites to any accounts you may already have. Alternatively, you can add your CONTENTdm site as a new Property under an existing Analytics account, but only if that account uses the newer version of Google Analytics, called Universal Analytics.

 Note: If you are currently using CONTENTdm with the older version of Google Analytics, called Classic Analytics, then a new Analytics account is not just recommended, but required. The Google Analytics integration in CONTENTdm 6.4 and later works only with Universal Analytics. Whichever version (Classic or Universal) you are currently using, you do not need to remove it in order to take advantage of the Google Analytics integration in CONTENTdm 6.4 and later. However, according to Google's Universal Analytics Upgrade Center, "All Google Analytics properties will soon be required to use Universal Analytics."

  • To set up a Google account, please see "Create a Google Account," instructions in Google online help.
  • To set up an Analytics Account, see "Get started with Analytics," instructions in Google online help.
    • You will create a new Tracking ID. It is a good idea to write down the Tracking ID for later reference.
    • You can ignore the JavaScript tracking code listed below the Tracking ID when it is created.

To track analytics for the CONTENTdm Website:

  1. Sign in to the CONTENTdm Website Configuration Tool.
  2. On the Global Settings tab, click the Analytics & SEO button (left-hand side ), and then click Google Analytics.
  3. Check the Enable Google Analytics box, and then paste your new Tracking ID into the Google Analytics Tracker ID box that appears.
  4. Click the Save button.
  5. Click the Publish button, and then sign out the Website Configuration Tool.


  1. Go to Google Analytics,
  2. Click Sign in to Analytics, and then sign in with your Google Account credentials.
    • The resulting page will display all your Google Analytics accounts.
  3. Click an account to see a list of its properties (websites), and then click a property to see a list of its views.
    • A view is used to filter and control access to Google Analytics data. See Google's Hierarchy of organizations, accounts, users, properties, and views for more on the relationship between accounts, users, properties, and views.
    • Clicking a view will take you to the Reporting tab for that view for that property. For now you have one property for your CONTENTdm website, and one view, called All Web Site Data.
  4. Click the All Web Site Data link.
  5. On the left-hand side of the resulting Reporting tab, you will see a navigation bar with several links. Click the Real-Time link, and then the Overview link that appears underneath it.
    • You will see a report prominently featuring the words "Right now N active users on site," where as "N" represents the number of active users.
  6. Open another browser tab, go to your CONTENTdm site. Return the Reporting tab, confirm that "N" has increased by 1.

The left-hand navigation bar in your Google Account includes many other canned reports in the Audience, Acquisition, Behavior and Conversions sections. These are not updated in real time. So, until a day or two has passed, you will not see any traffic information in these reports.

Using Standard Reports

Google Analytics standard reports give you many ways to look at your CONTENTdm usage data. In this section we explore a few examples of using standard reports to answer common CONTENTdm usage questions.

Before diving into these details, you may want to take a few minutes to glance at a few of the reports under each of the standard-reports headings (Real-Time, Audience, Acquisition, Behavior and Conversions) in order to get an idea of the range of possibilities that await.


How much traffic are my collections getting?

  1. In the navigation bar on the left-hand side of the page, click Behavior.
  2. Under Behavior Flow, click Site Content, and then click All Pages.

You will see a graph of Pageviews on your site over the last month, and below that a table giving statistics for the pages on your CONTENTdm site.

By default the data is displayed ten rows at a time. Go to the bottom right corner of the report to page through the data, or use the Show rows drop-down to increase the page size.

By default the Pages report lists pages by their path (Request URI), that is, the portion of the URL after the domain name. For example:


This doesn't tell you much about what item you're looking at. Also, using paths breaks up the Pageviews for an item according to which of its URLs was used to retrieve it. Sometimes this may be what you want (see Appendix 1 for details), but most of the time it probably isn't.

To see a more helpful display, go to the left side of the report, right under the graph, to the right of Primary Dimension, and then click Page Title

The key data column is the Pageviews column. The Pageview is one of Google Analytics' two central concepts; Google defines it as " An instance of a page being loaded (or reloaded) in a browser."

The other columns — Unique Pageviews, Avg. Time on Page, Entrances, Bounce Rate, % Exit and Page Value — use Google Analytics' other core concept of a session. See the next section of this document for more about sessions.

Getting per-collection data

You can use the Pages report to display the Pageviews per item for each of your CONTENTdm collections. Above the table heading, you will see a search box. Enter the name of one of your collections, for example: Account Books, Diaries and Journals. Then click the magnifying-glass icon to see the Pageviews for that collection. The total is displayed at the top of the column.

There are many other options available in this report. For example:

  • Toward the top left of the report, click the Export drop-down to see a selection of available export formats.
  • Near the top of the report, click the All Sessions or Add Segment tile to see a variety of tools for working with Segments, which let you analyze subsets of your users and their sessions on your site. To close the Segments pane, click Cancel in its lower left corner.
  • Directly below the Segments tiles, click the Navigation Summary tab. Use the Current Selection drop-down, located below the graph, to select a page. This will show you how your users got to that page and where they went upon leaving it.
  • Go back to the Explorer tab and note that the page selection persists. In the top left corner of the report under the Pages heading, click ALL to remove the page selection.
  • At the top right of the report, click the date range to see a drop-down where you can choose a standard date range (e.g. last week or last month) or create a custom date range. Within the date range drop-down, you can also check the Compare to box to set a second date range to be displayed along with the first one.
  • At the top right of the graph, you can change the data aggregation period from Day to Week or Month.
  • Below the graph, at the top right of the table, choose one of the buttons to change the table display, for example, replacing some of the columns with a pie chart or bar graph.


Which of my items are most popular? How much time do users spend on them?

The Session is the second core concept in Google Analytics. Google defines a Session as "a group of interactions that take place on your website within a given time frame" — by default, until 30 minutes have passed without further activity by the user.

The concept of a Session allows us to make sense of more of the columns in the data table in the Pages report. Note that all of these session-dependent metrics are calculated on the basis of sessions on your CONTENTdm site as a whole, not its individual collections. Later in this document we'll explore methods for getting collection-specific data.

  • Unique Pageviews: A Unique Pageview is the first view of a page during a specific session. Since the Unique Pageviews metric counts only the first time the page is viewed during each session, it is equal to the number of sessions during which the page is viewed at least once. Google defines a page's Unique Pageviews as "the number of sessions during which that page was viewed one or more times." Google support provides an article with more on Pageviews and Unique Pageviews.
  • Avg. Time on Page: Within a session, how long on average did users remain on the page? More time is better, but only up to a point. After some context-dependent amount of time, more time may become an indication of bafflement rather than engagement.
  • Entrances: How many times was this the first page in the session?
  • Bounce Rate: When this was the first page in the session, how often was it also the last page? That is, how often did users "bounce off" this page?
  • % Exit: For what percentage of the Pageviews was this the last page in the session?

These last three metrics can be useful in understanding how users are finding your items. Entrances, Bounce Rate, and % Exit all tend to be high for items that users discover primarily by way of search engines.


Where are visitors to my site located? How much time do they spend on my site?

The Sessions metric counts visitors to your site once for each visit they make. If someone visits your site once a day for 30 days, that will show up in your statistics as 30 sessions.

A user (sometimes referred to as a visitor), is counted only once regardless of the number of sessions they spend on your site in a given timeframe. If you are looking at sessions over the course of 30 days, and a user visits once a day during that timeframe, they will show up in your statistics as only one user. See the Google support article How users are identified for users metrics for more information about users.

You need to look at both Sessions and Users metrics in order to understand the patterns of usage of your CONTENTdm collections. Do you have a small number of frequent users, a large number of infrequent users or a mixture of both?

In the navigation bar on the left side of the page, click Audience, and then click Overview. You will see a graph of sessions on your site. Note that the date range carries over from the Pages report.

The pie chart to the right shows the percentages of sessions on your site due to returning visitors and new visitors. A new visitor is a user making their first appearance on your site.  A returning visitor is a user who has been to the site before. Hover the mouse over the pie slices to compare the Returning Visitors and New Visitors numbers with the Sessions and Users numbers to the left.

Note that a user who has been to the site at any time in the past — inside or outside of the range of dates currently displayed in the report — counts as a returning user. So, it is possible to have 100% Returning Users. You are especially likely to see this for short reporting periods.

Below the Sessions graph you will see several miniature graphs. Click any of the miniature graphs to see it at full size. For example, click the Avg. Session Duration graph. You can see details for a specific day by hovering the mouse over the dot that represents it on the graph.

Below the miniature graphs you will see links that you can use to get an assortment of information about the sessions on your site. Select a category under Demographics, System or Mobile. Note the summary report that appears to the right, and then click the view full report link (lower right, below the summary report) to get more details on that category.

You can get more details about sessions from the New vs Returning, Frequency & Recency, and Engagement reports. In the left-hand navigation bar, click Audience, and then Behavior to access these reports. You can get more details about users by using a Custom Report — see the example in the Custom Reports and Dashboards sections below.


How do users find my site?

In the left-hand navigation bar, click Acquisition, and then click Overview. You will see graphs giving statistics for sessions on your site, categorized by the channel with which the session originated, e.g. Direct, Referral, Organic Search or Social. Further details on the traffic from each of these channels are available in the Channels report. You can access the Channels report by clicking the "To see all N Channels click here" link, located below the Overview table.  

Event Tracking

What do users do on my site?

There are three levels of categorization for events:

  • The top level, Event Category, represents the kind of thing the user is trying to do.
    • The following event categories are supported: home page, header, collection landing, search, advanced search, search results, single item, compound object, navigation, footer, and login.
  • The second level, called Event Action, tells what the user did in the CONTENTdm user interface in order to accomplish the task specified in the Event Category: click, toggle, open, close, etc.
  • The third level, called Event Label, provides additional details.

To see an example: In the navigation bar, on the left-hand side of the page, click Behavior, then click Events, and then click Top Events. You will see a graph of total events on your site over the last month, and below that a table listing the events by event category.

Select a date range you're interested in. In the table, click an item in the Event Category column to see the event actions taken by users in that event category. Then, above the list of event actions, click Event Label link to see the event Labels for that event category. This is probably what you're most interested in, e.g. what items did my users download? what did they print? what did they search for?

When you chose an event category, you also caused an EVENT CATEGORY drop-down to appear in the top left corner of the report, directly under Top Events report title. You can use this drop-down to browse the labels and actions for the other categories.

Custom Reports

The following custom report example shows how to view users by filtered Page Title, enabling you to see details on your Users per Collection.

  1. In the left-hand navigation, click Customization, and then click Custom Reports. Under the Custom Reports heading, click the + New Custom Report button. The Create Custom Report box opens.
  2. In the General Information section, change the Title to Users by filtered Page Title.
  3. In the Report Content section, accept the defaults for Name and Type. Under Metric Groups, click + add metric, then click Users, and then click Users again. Do not select "Users (Deprecated)." Under Dimension Drilldowns, click + add dimension, then click Behavior, and then click Page Title.
  4. In the Filters section, click + add filter, then click Behavior, and then click Page Title. In the drop-down that appears to the right, choose Regex (short for regular expression), and in the text box to the right of that, enter Collection Name. For example, if you want to see users for the "Account Books, Diaries and Journals" collection, enter "Account Books, Diaries and Journals" (without the quotation marks). Be sure not to enter any extra characters — including spaces — as these will cause the regular expression not to match.
    • To avoid Google's autocomplete feature, type the regular expression you want, and then click outside the text box, without pressing the Enter key.
  5. At the bottom of the page click Save. The custom report will display. If you need to edit it, click the Edit button located below the Users by filtered Page Title heading.

In the table below the line graph, the Users column gives per-item user counts. Note that the users metric is not cumulative in the same way as, for example, Pageviews.  For more information about users and active users metrics, see the Google support article, How users are identified for users metrics.

You can use this custom report as a basis for similar custom reports for your other collections. In the left-hand navigation bar under Custom Reports, click Overview to see a list of all the custom reports you have created so far. In the entry for the report you just created, click the Actions drop-down at far right, then click Copy. The Create Custom Report box opens. It has the same properties as the report you copied. Modify the Title and Regex for your new collection, and then click Save. Repeat as needed for all the collections for which you want to count the users.


You can create dashboards using standard reports, custom reports, and custom widgets.

You can use a dashboard to present information for several collections on a single page. Note that you cannot have different filters on different tabs of the same Custom Report. A dashboard can contain a maximum of 12 widgets, so you can display information for up to 12 collections. In the following example, we will use a dashboard to summarize Pageviews per collection.

  1. In the left-hand navigation, click Customization.
  2. In the left-hand navigation bar, click Dashboards, and then click the Create button.
  3. Select Blank Canvas. Type Pageviews for my Collections in the text box, and then click the Create Dashboard button.
  4. In the Add a Widget box that appears, under Widget title, enter Pageviews for [collection name].
  5. Under Standard, select Timeline.
  6. Under Graph the following metric over time, choose Pageviews. Leave the Compare with (optional) drop-down as is.
  7. Under Filter this data, click the Add a filter link. Then in the Add a dimension box that appears, select Page Title. In the drop-down immediately to the right, choose Regular Expression, then in the text box to the right of that type Collection Name.
  8. If you want the widget to include a link to a report with more detail on the collection, or to the collection itself, then enter a report name or a URL in the Link to Report or URL box.
  9. Click the Save button. The widget displays on the dashboard. You can hover over the dot for a given date to see the exact number of Pageviews.
  10. You will need to add a widget for each collection. Click + Add Widget to add another widget, then repeat the steps above for each collection. Or, if you want to base the new widget on an existing widget, you can hover over the existing widget, click the pencil (edit) icon that appears in its top right corner, click the Clone widget link in the bottom right corner of the Widget Settings box, and edit the resulting cloned widget.

You can also use the Add to Dashboard button in a Standard Report or Custom Report to create a widget based on the report and add it to the dashboard. Note that these widgets are not dynamically linked; subsequent changes to the report will not be reflected in the widgets. To change the way the widgets appear on the page — for example, if you want them to appear full width — click the Customize Dashboard button in the top right corner of the dashboard and choose a new layout .

Next Steps

This document has only scratched the surface of what is possible with Google Analytics and CONTENTdm. You are encouraged to experiment and to share your experiences with the CONTENTdm community in the CONTENTdm Discussion Boards. You may also find the following Resources and Appendices helpful.


Here is information you can use to dig deeper into Google Analytics and what it can do for your CONTENTdm collections.

Refining your use of dimensions and metrics

More about the capabilities of Google Analytics

How others are using Google Analytics for libraries, archives and museums

Much of Google's material is geared toward e-commerce. The following is some discipline-specific information.


Appendix 1: CONTENTdm URLs

Here we provide information you may want in order to create regular expressions to do more fine-grained sifting of the Pageviews reported for your items. This information can also be helpful when comparing Google Analytics results with the numbers provided by the CONTENTdm Item Pageviews and Usage Summary reports.

 Note: Here are three things to keep in mind when comparing results from the CONTENTdm Item Pageviews and Usage Summary reports with results from Google Analytics.

  1. The CONTENTdm reports include all the Pageviews for an item in a single number, regardless of how many different URLs are used to reach the item.
  2. The CONTENTdm reports only count Pageviews for item pages, not search pages and landing pages.
  3. There may be differences in results due to differences in how bot exclusion is handled.
  4. The CONTENTdm reports include all the Pageviews for the CONTENTdm Websites.
Item URL format

The CONTENTdm Website has this item URL format for all items: