Analytics for Single Files

Hi!

Is there a way to track the download count of a single file?
I have a static API which consists of a couple JSON files for which I would like to track how many hits they get.
I tried Netlify Analytics but it doesn’t seem to have that functionality.

Hi @apq

Nothing built-in that I am aware of. There are analytics services that have configurable events so you can tell when a user clicks a specific link on a page.

You could possibly create a serverless function that could act as a counter, sending this information to a remote source (e.g. database) and return the data for download or redirect the user to the download source.