How to get download statistics/analytics from gh-pages for DRAT archives

445 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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.