Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 739
jangorecki Avatar asked Sep 26 '15 19:09

jangorecki


1 Answers

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.

like image 195
Spacedman Avatar answered Sep 18 '22 18:09

Spacedman