Some background:
The R language community has a big packages repository called CRAN.
With the drat package it is easy to host private CRAN-like repositories. There are many organizations which hosts their R packages using the drat package and a gh-pages
branch. Drat simply creates a directory structure which is recognized by the R command install.packages()
. There is no index.html
file in the repository structure.
My question is then:
How can one gather per-file download statistics from these gh-pages
?
I've found the "How to add Google Analytics Tracking ID to GitHub Pages" question but it requires an index.html
, so it cannot be used here.
Any suggestions how to solve this?
Is this supported by GitHub at all?
Can't be done. You can track HTML page delivery from gh-pages because HTML pages can run the Google Analytics Javascript. But a download is a download and doesn't run any scripts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With