I didn't wanted to use Google Analytics or similar tools to track the traffic of my side projects because: a) I don't need that much details about my views and b) I don't want to have a cookie consent dialog for asking for permission to forward user related data to a 3rd party service.
Because of that I use a self made and hosted service for tracking basic web traffic analytics stuff: basic_analytics.
It is made with Django, Bootstrap and chart.js and provides an API endpoint where you can send the page view data as payload.
With that data it can generate different charts that show:
Update February 2022
In order to send data to Basic Analytics from the backend I created a Django app called django_basic_analytics_tracker.
It provides a mixin that you can use in the views that you want to track. It overrides the dispatch
method, take some request data and sends it to basic analytics service in the post payload.
This is a collection of commands and resources that were useful for me with the initial setup of my MacBook.
xcode-select --install
alias g='git'
alias gc='git checkout'
alias gco='git commit'
alias gs='git status'
alias gp='git pull'
alias dc='docker-compose'
alias up='docker-compose up'
alias down='docker-compose down'
With htmx is possible to build dynamic Webapps without REST-APIs and JavaScript. Just simple Django views that returns html.
You can learn more about it in this interesting Django chat podcast episode with the htmx creator Carson Gross.
I really like the idea and I wanted since a while to try htmx working together with Django and finally, I managed to work on that. I created this repository with some implementations with Django of the code examples from the htmx docs page.
**Update: **also this website has some htmx magic on it. For example the post pagination or the search function are built with htmx.