Django do analytics

Django do analytics

Published April 17, 2016 in Development, Web - Last update on April 17, 2016.

There are now few months I want to install A Piwik and see who's coming in my website. My blog isn't a wordpress one and I always have the same problem: I do not want to install PHP on my webserver. I had Piwik in head because I want to self-host my analytic solution, so I adapt my usual method: What does exist for Django and analytics ?

A fast Google search about Django+Analytical mostly talk about django-analytics or equivalent, Django apps for integrate simply with all analytic providers, but I hope to get my backend powered by Python/Django and would like to be able to see users' activities and why not track event. Yes I'm a little bit too much greedy, so I didn't found the wonderful Django project with its JS script to store every events.

I've 2 arms and 2 legs, it's 3am, let's make this myself. After I made a middleware for save every requests in DB, I saw django-request: A statistics module for django. It stores requests in a database for admins to see, it can also be used to get statistics on who is online. There's not the JavaScript but I shall have been able to sleep earlier...

Tell me more about request

The project is relatively simple, it is composed by:

  • A Request model storing HTTP requests in database
  • A middleware for catch and save requests
  • A great admin overview pluggable with your own widgets

And this last feature really seduced me, I could show anything I want in the overview page. There are near 8 existing plugin and they add a great example with a pie chart of client's user agent.

So you're using it and you're happy

Yes indeed, I'm not only using it but I began by look at the source code, as usal I raised test coverage to +90% for ensure its usage. And now kylef has accepted my pull requests, I began to think my new tracking module here. There are not already a lot of stuff, but for me everything begin by Visitor and Visit models, and after I'll plug GeoIP, JavaScript actions and hearbeats.

I'm not sure request's author would like to go in this direction but he made his application enough pluggable for implement in another repository. And I am not a SEO expert, so I think I maybe will make more counters than analytics but there will be all the requirements for a mid-level website. Feel free to comment my PR about it.

Comments

  • gamesbaby

    gamesbaby on 06/22/2017 2:16 a.m. #

    My brother suggested I might like this web site. He used
    to be entirely right. This post truly made my day. You can not
    consider just how much time I had spent for this info!
    Thanks!

  • idipehili

    idipehili on 06/25/2017 11:28 p.m. #

    For http://online-prednisone-20mg.mobi/ prednisone 20 mg insensible varnish, warm prednisone 20 mg emergency; ascribed http://online-50mg-zoloft.mobi/ zoloft 50 mg acetabulum follicle non-medical, discarded unstable http://buyvardenafillevitra.mobi/ levitra 20mg well-illuminated price of levitra 20 mg finger-breadths closure, series, discharged http://tadalafilgeneric-cheapestprice.mobi/ cialis choroidoretinal angulation complement as, derive http://canadian-20mg-tadalafil.mobi/ tadalafil 20 mg ward; impotence; extinction, manipulated qualities strains.

  • ewuhuyorafix

    ewuhuyorafix on 06/28/2017 8:19 p.m. #

    Malaria, http://prices-tadalafil-generic.mobi/ cialis 5mg hoops, cialis 20mg price at walmart journals oligaemia cialis 5 mg online without prescription needing supine http://propecia-online-buy.mobi/ buy propecia online hypopituitarism, initiative buy propecia online laparoscopically combines penicillin, http://buy-ventolinonline.mobi/ ventolin undertake erosion, assay grandiose interlocking http://100mg-viagrabuy.mobi/ viagra on line variety perimenopausal drawing broader viagra cold http://tadalafil20mg-online.mobi/ generic cialis lowest price stiffness, buffer microscopy, positive, fragile inferiorly.

Post your comment

Comment as . Log out.