Review Analytics Options

Enterprise Pressbooks networks have two options for collecting and viewing analytics data:

  • Koko Analytics (built into Enterprise networks by default, no setup required)
  • Google Analytics 4 (optional; requires setup by a network manager)

We recommend Koko Analytics for clients[1], but it’s possible to configure an optional Google Analytics integration as well. These two methods for understanding visitor web traffic can be used separately and are non-exclusive (they do not impact one another).

Comparing Koko Analytics and Google Analytics 4

Koko Analytics Google Analytics 4
Records total visitors and pageviews over time for books (and their chapters / pages) as well as network pages (the homepage, the catalog, etc.) Yes Yes
Displays analytics for any specified date period Yes, beginning from the moment your Pressbooks network is deployed Yes, after (optionally) configuring your Pressbooks network to send events to Google Analytics
Viewable by authors? A book’s Analytics dashboard is accessible to authors with the user role of Administrator on the book. Authors don’t have immediate access to Google Analytics data. You would need to set up a report to share book stats with an author.
Privacy information Koko Analytics is GDPR-compliant by design and entirely open-source. It collects no personal information or anything that could lead back to a specific visitor. It uses cookies to determine returning visitors and unique pageviews, but the use of cookies can be switched off in settings. As Google writes, “When you use Google Analytics on your site or application, you must disclose the use of Google Analytics and how it collects and processes data.” According to Google’s documentation, GA4 uses first-party cookies to distinguish unique visitors and unique sessions.
Allows for excluding internal traffic from analytics? There is an option to exclude certain user roles from being counted in analytics (Administrator, Editor, etc.) It may be possible to filter out identified internal traffic through data filters or report filters.
Allows for exporting data? Network managers can download a CSV file with page views for all books on the network (as well as file downloads) from the Stats page. Reports you’ve set up can be exported as PDF or CSV files.

About Koko Analytics

Our Koko Analytics integration displays information about the number of visitors and page views for individual books as well as network pages over time. It also displays referrers to books or network pages, counting total visitors and page views that have come through each referrer.

This data is visible for individual books from the Analytics dashboard in a book’s admin dashboard. Authors with the user role of administrator on a given book can view it there too.

Data for network pages is visible to network managers from Stats > Analytics in the Administer Network dashboard.

Leveraging the Koko Analytics integration, network managers can also download a CSV file from the Stats > Network Stats page with page views and total visitors data for all books on your network over time. This also includes the number of book downloads in each file type.

View Koko Analytics data

Location of Analytics (under Dashboard)To view Koko Analytics data, navigate to “Analytics” on the left sidebar menu of a book’s admin dashboard.

You will see a dashboard presenting total visitors, pageviews over the selected time period. Beneath this graph you will see tables displaying the most visited pages/chapters in your book, and most frequent referrers to your book. You can adjust the date range using the date picker tool in the top left of the page. Users with the role of administrator can also see this book-level analytics data in their books.[2]

Koko Analytics Dashboard

Note: We have configured our servers to collect page view information at least once per day. This means that visitors and pageviews will always be accurate at the level of the month/week/day, but the realtime (hourly) pageview count is not guaranteed to be accurate, since we may not have run the page view aggregation script for a given book within the past hour.

 

Configure Koko Analytics settings

Within the Analytics page, settings can be configured by navigating to “Settings” in the top-right corner.

Settings view for Koko Analytics

Here you can:

  • exclude pageviews from specified user roles (applied to subsequent pageview collection upon saving changes)
  • enable or disable a cookie that determines unique pageviews
  • set the displayed date period
  • specify when to delete older analytics data, if ever (default storage is 60 months)

Send Events to Google Analytics

If you would like to configure your Pressbooks network to send page view information to Google Analytics:

  1. Use the Google Analytics dashboard and create a new web ‘property’ for your Pressbooks network (i.e. the URL of your network itself). Doing so will give you a Google Analytics ID for that property. (Please note that if your network currently uses a Universal Analytics property, going to the Admin view for it in the Google Analytics dashboard will lead you to a ‘GA4 Setup Assistant’; you will be able to set up a connected Google Analytics 4 property there, copy its ID (for example ‘G-A123B4C5DE6’), and enter it on this page.)
  2. Once this has been generated, paste this value in the relevant Google Analytics ID field.
    Screen capture of the Network Web Analytics Settings tab on the Network Settings page
  3. Click Save Changes.

Once your Google Analytics ID has been saved here, your Pressbooks network will begin sending information about web traffic and book download events to your Google Analytics dashboard.To learn more about using Google Analytics, see Google's documentation resources.


  1. Using Koko Analytics as an open-source user on a self-hosted Pressbooks instance would require installing the plugin and setting up a cron yourself to collect stats regularly. However, open-source users have access to the optional Google Analytics 4 integration in Network Settings.
  2. For more on book-level user roles, see our guide chapter on Users.

License

Icon for the Creative Commons Attribution 4.0 International License

The Pressbooks Network Manager's Guide Copyright © 2024 by Pressbooks is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book