Harvard created an analytics dashboard for their Spotlight exhibits using Google Data Studio. Based on that work, Cornell created a dashboard for their site. Harvard's site includes an overview for all exhibits and a page for each exhibit. Cornell's example is a summary for all exhibits. Feel free to test out both dashboards using the instructions below, which also includes instructions and a template for creating your own dashboard--check your institution's patron privacy policies before making a dashboard. Please also feel free to update this page with additional instructions as you test and create your own and/or let us know if you have found other helpful analytics dashboard tools and tips!
You can also view a recording of the Harvard dashboard being demoed during the Spotlight community call on 2/8/2019.
Harvard's and Cornell's Analytics Dashboards
Viewing the live Harvard overview and exhibits dashboards
- View Harvard's dashboard
- Select the desired Spotlight exhibit using the dropdown menu (bottom left in full screen mode, top left in a new tab) NOTE: This is in the title bar, not in the dashboard.
- Select the desired date range in the top right (the default is last month). The data will automatically refresh when a new date range is selected
Viewing the live Cornell site dashboard
- View Cornell's dashboard
- Select the desired date range in the top right (the default is the current month). The data will automatically refresh when a new date range is selected
Interacting with Data
The charts on the dashboard pages are interactive, hovering your mouse over them will provide more details. For example, hovering over the 'desktop' slice of the pie chart for 'User Devices' will show both the percentage and number of desktop users. Similarly, hovering over a country in the map will display the country name and number of sessions. You can also scroll and page through the lists of 'Most Visited Pages' and 'Top Search Terms'.
Exporting Data
Depending on the website and date range selected, the following charts often only show a portion of the data in the dashboard:
- How are users finding us?
- Most Visited Pages
- Top Search Terms
- The map
Because these charts contain a lot of information, it is easiest to see the full data by exporting it. To export the data:
- Hover over anywhere on the chart you wish to export and notice an ellipsis (3 vertical dots) will appear on the top right side of the chart
- Click on the ellipsis and select the desired output option
Downloading a Report
The entire report can be exported to a PDF by clicking the 'download report' arrow icon in the top right menu, you'll have the option to select which pages you'd like to download. The PDF is not interactive and will only display what is shown in the dashboard.
Creating Your Own Dashboard
Be sure to check your institution's patron privacy policies before making a dashboard!
If you'd like to create an analytics dashboard like the ones above, the following will help get you started:
- Make a copy of the Harvard dashboard template or the Cornell dashboard template
- Open one of the templates
- Click icon in the top right to 'Make a copy of this report'
- Select your data source (we are using Google Analytics, see Connect to Data for a list of all available sources)
- Under New Data Source, click Select a datasource... and click CREATE NEW DATA SOURCE
- If you are connecting to Google Analytics (GA), click Google Analytics → your account → the site under Property → All Web Site Data (or subset you configured in GA)
- OR connect to one of the other datasources
- click CONNECT button
- Modify the charts as desired
Creating an overview page for the site
The goal for the overview page is to display stats on public pages in published exhibits. Fields and filters are created to achieve this.
Setting up Fields
Reference: Data Studio: Add Fields
Two calculated fields were created that aid in the process to limit data used on the overview page. These will be used in conjunction with filters.
General process to create a field
- click any widget that uses data
- select DATA tab on right
- click ADD A FIELD
- set the name and formula and save
Field to group pages by exhibits
Field Name | Exhibits |
---|---|
Formula | Uses regex to select out published exhibits |
Example | CASE WHEN (Page='/') THEN 'Home' WHEN (REGEXP_MATCH(Page, '.*my-exhibit.*')) THEN 'My Exhibit' WHEN (REGEXP_MATCH(Page, '.*my-other-exhibit.*')) THEN 'My Other Exhibit' ELSE 'Unpublished' END |
Create with | You can use a utility script to generate this CASE statement. See DataStudio.published_exhibits_field. This uses Spotlight::Exhibit.where(published: true) to get the list of published exhibits to generate the case statement. |
Field to group edit and admin pages
Field Name | Admin Pages |
---|---|
Formula | Uses regex to select out edit and admin pages |
Example | NOTE: This is the code at the time this was written. It may have been adjusted if more patterns were identified to select admin pages. CASE WHEN (REGEXP_MATCH(Page, '.*dashboard.*')) THEN "Dashboard" WHEN (REGEXP_MATCH(Page, '.*/edit')) THEN "Edit" WHEN (REGEXP_MATCH(Page, '.*/edit#.*')) THEN "Edit Tab" WHEN (REGEXP_MATCH(Page, '.*/edit/.*')) THEN "Edit Item" WHEN (REGEXP_MATCH(Page, '.*/users')) THEN "Users" WHEN (REGEXP_MATCH(Page, '.*/admin_users')) THEN "Admin Users" WHEN (REGEXP_MATCH(Page, '.*custom_fields.*')) THEN "Custom Fields" WHEN (REGEXP_MATCH(Page, '.*custom_search_fields.*')) THEN "Custom Search Fields" WHEN (REGEXP_MATCH(Page, '.*catalog/admin.*')) THEN "Item Curation" WHEN (REGEXP_MATCH(Page, '.*resources/new.*')) THEN "New Item Curation" WHEN (REGEXP_MATCH(Page, '.*/new')) THEN "New Exhibit Curation" WHEN (REGEXP_MATCH(Page, '.*tags')) THEN "Tag Curation" WHEN (REGEXP_MATCH(Page, '.*searches')) THEN "Browse Curation" WHEN (REGEXP_MATCH(Page, '.*feature')) THEN "Feature Curation" WHEN (REGEXP_MATCH(Page, '.*feature#add-new')) THEN "Feature Curation (new)" WHEN (REGEXP_MATCH(Page, '.*about')) THEN "About Curation" WHEN (REGEXP_MATCH(Page, '.*about#add-new')) THEN "About Curation (new)" ELSE "Public Pages" END |
Create with | You can use a utility script to generate this CASE statement. See DataStudio. admin_pages_field. This hardcodes the regex statements that group the various admin related pages. |
Setting up Filters
Reference: Data Studio: Add Filters
Two filters were created that aid in the process to limit data used on the overview page.
General process to create a filter
- Select menu Resource -> Manage filters
- Click + ADD A FILTER
- set the name and filter details and save
Filter to include published exhibits only
Uses the Exhibits field to exclude unpublished exhibits.
Filter Name | Published Exhibits filter |
---|---|
Filter |
|
Filter to exclude admin pages
Uses the Admin Pages field to exclude unpublished exhibits.
Filter Name | Exclude Admin Pages filter |
---|---|
Filter |
Note: List of page groups to exclude is truncated. See example. |
Example | NOTE: This is the list of admin page groups at the time this was written. It may have been adjusted if more patterns were identified to select admin pages. Dashboard,Edit,Edit Tab,Edit Item,Users,Admin Users,Custom Fields,Custom Search Fields,Item Curation,New Item Curation,New Exhibit Curation,Tag Curation,Browse Curation,Feature Curation,Feature Curation (new),About Curation,About Curation (new) |
Create with | You can use a utility script to generate the list of admin page groups to exclude. See DataStudio. exclude_admin_pages_filter. This hardcodes the regex statements that group the various admin related pages. |
Using Filters
Reference: Data Studio: Using Filters
For the overview page, set a page level filter so that the same data is available across all widgets. Specifically, this will use the filters to limit data to public pages in published exhibits.
- select menu Page -> Current page settings
- select DATA tab on right
- click + ADD A FILTER
- select filter: Published Exhibits filter
- click + ADD A FILTER
- select filter: Exclude Admin Pages filter
Creating a page for a single exhibit
The directions for a single exhibit page assume that you copied the Harvard template for a single page and are editing the existing filters to be specific to one of your exhibits.
Setting up Filters
In order to create a dashboard page for each exhibit (like the Exhibit Example page in the template), you'll need to create a filter for each exhibit. To create and apply a filter:
- Go to Resource > Manage filters
- Edit the Artemas Ward filter with your exhibit name and URL slug. Close the filter window.
- Each chart on the Exhibit Example should automatically update with the new filter data
To create a new exhibit page with a new filter:
- Duplicate the Exhibit Example page: Go to Page > Duplicate page
- Duplicate and edit the filter: Go to Resource > Manage filters > Duplicate, then Edit the filter created above. Close the filter window.
- Apply the new filter: Go to Page > Current page settings. In the right menu, remove the previous page filter and add the new one. Note: If you don't see the option to add a page filter, make sure you have a data source selected in the page settings.
Tips & Outstanding Questions
The report can be embedded on a website page by going to File > Embed report
Search terms do not populate automatically and have to first be set up in Google Analytics to track the data. To set this up, see Set up Site Search.
Direct is a bucket Google Analytics uses for unknown sources as well users bookmarking and coming to a site directly. If you are not seeing a known source coming through in your analytics, such as your library website, try adding a UTM parameter (or tag) to the source links. The Campaign URL Builder is a very helpful tool for this.
Ideally, it would have been better to create one dashboard page and enable end-users to select and apply the filter for a particular exhibit in the same way they can with the date range picker. We were unable to find a way to make this work and would love to hear if someone in the community finds a way. Our current solution is quick and easy to set up a new page, but it will be time consuming if we want to make a change to all pages in the future, especially as our exhibit number grows.
- Links cannot be styled. All links are blue and underlined. To get around this...
- Create a text field with the text styled as desired.
- Duplicate the text and set it to be a link
- set it to be a link
- drag it overtop the styled text
- select all the text and set the opacity to 0% (NOTE: This is the opacity of the fill under Background and Border in the Style tab for the duplicated text.)
Resources
Demo of Harvard's dashboard during 2/8/2019 Spotlight community call - https://youtu.be/s9tL39UrLxw
Scripts for generating fields and filters (code, documentation)
Data Studio Help - https://support.google.com/datastudio
Connect to Data - https://datastudio.google.com/data
Set up Site Search - https://support.google.com/analytics/answer/1012264?hl=en
Campaign URL Builder - https://ga-dev-tools.appspot.com/campaign-url-builder/