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, 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).
Read on to learn more:
|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.|
|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.|
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.
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.
Within the Analytics page, settings can be configured by navigating to “Settings” in the top-right corner.
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)
If you would like to configure your Pressbooks network to send page view information to Google Analytics:
- 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.)
- Once this has been generated, paste this value in the relevant Google Analytics ID field (the Google Analytics 4 ID field).
- 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.
- 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. ↵
- For more on book-level user roles, see our guide chapter on Users. ↵