Expand | ||
---|---|---|
| ||
|
...
Harvard Harvard has 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 Harvard's dashboard 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 this the Harvard dashboard being demoed during the Spotlight community call on 2/8/2019.
Harvard's and Cornell's Analytics
...
Dashboards
Using the dashboard
Viewing the live Harvard overview and exhibits dashboards
- View Harvard's View the 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
...
If you'd like to create an analytics dashboard like the one ones above, to the following will help get you started:
- Make a copy of this 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 |
| |||||
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.
| |||||
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.
| |||||
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:
...
- 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 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/