I want to save everything that can be used for statistics, such as referrer, os, browser etc. What is available and what’s the best way to store it?
This is only important for 1 application (1 page) in the project, the other pages some standard analytics product will be used such as google analytics.
I had a look at django-tracking, but it seems this is overkill as I only want to use it on 1 view. The ideal situation would be, passing the whole request object to a TaskQue and do the processing later. So the user is redirected first and the analytics processing will be done behind the scenes.
We use some simple middleware.. below is an excerpt. You can modify it to use directly within a view.