I recently read the wonderful article Homemade Analytics with Elixir and Ecto by @josevalim and decided on using the described approach in a couple of my projects. I didn’t want to copy&paste the code into every project and decided on creating a library instead.
Disclaimer: I absolutely do not want to take credit for José’s code, so I tried to reference his blog article everywhere I could. This library is simply meant as a helper for using his code in your project.
A library tracking how many visitors a Phoenix-based application receives per day without collecting any data from the user. It encapsulates the Homemade Analytics code of
José Valimand simply counts the page-requests per path per day. The collected data is stored in a configurable Ecto-repository.
I hope that you find this helpful. My next steps will be to create a nice UI for the collected data. Feel free to help and contribute