Proposed Change To Book Download Tracking


#1

We’re making a change to book download tracking. I’m aiming to squeeze it into 5.7.0. We’ll be changing a Google Analytics event from:

ga('send','event','exportFiles','Downloads','{$filetype}');

To:

ga('send','event','exportFiles','Downloads','{$title}:{$filetype}');

Link to pull request » (via @SteelWagstaff)

For us: It’s a trivial change, the customers we support want this, it’s an improvement, etc. This code has a filter: pressbooks_download_tracking_code. Others can remove our change.

@brad @bryan @rootl and other open source users (possibly) using this. Do you see a reason why this would break things (that you can’t fix with the filter)? Pinging because the code was moved around (originally in the pressbooks plugin, now pressbooks-book) and I don’t remember the history behind book downloads / book download tracking.

Thanks for your input.


#2

thanks for checking in Dac - the filter is a good remedy for the proposed change https://github.com/BCcampus/pressbooks-textbook/blob/e43873819482cc9b3f78cf1e1d6a4764d9b5ea53/themes-book/opentextbook/functions.php#L192