django-tracking | Simple attempt at keeping track | Analytics library

 by   bashu Python Version: Current License: MIT

kandi X-RAY | django-tracking Summary

kandi X-RAY | django-tracking Summary

django-tracking is a Python library typically used in Analytics, React applications. django-tracking has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

Simple attempt at keeping track of visitors to django-powered web sites
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              django-tracking has a low active ecosystem.
              It has 220 star(s) with 90 fork(s). There are 16 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 0 have been closed. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of django-tracking is current.

            kandi-Quality Quality

              django-tracking has 0 bugs and 0 code smells.

            kandi-Security Security

              django-tracking has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              django-tracking code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              django-tracking is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              django-tracking releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              It has 1000 lines of code, 50 functions and 35 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed django-tracking and discovered the below as its top functions. This is intended to give you an instant insight into django-tracking implemented functionality, and help decide if they suit your requirements.
            • Return a list of active users
            • Return a human readable time
            • Update the list of active users
            • Compute the count of the variable
            Get all kandi verified functions for this library.

            django-tracking Key Features

            No Key Features are available at this moment for django-tracking.

            django-tracking Examples and Code Snippets

            No Code Snippets are available at this moment for django-tracking.

            Community Discussions

            QUESTION

            How could I modify django-tracking2 so users can opt out of tracking
            Asked 2020-May-31 at 02:58

            I'm making a website right now and need to use django-tracking2 for analytics. Everything works but I would like to allow users to opt out and I haven't seen any options for that. I was thinking modifying the middleware portion may work but honestly, I don't know how to go about that yet since I haven't written middleware before.

            I tried writing a script to check a cookie called no_track and if it wasn't set, I would set it to false for default tracking and if they reject, it sets no_track to True but I had no idea where to implement it (other than the middle ware, when I tried that the server told me to contact the administrator). I was thinking maybe I could use signals to prevent the user being tracked but then that would slow down the webpage since it would have to deal with preventing a new Visitor instance on each page (because it would likely keep making new instances since it would seem like a new user). Could I subclass the Visitor class and modify __init__ to do a check for the cookie and either let it save or don't.

            Thanks for any answers, if I find a solution I'll edit the post or post and accept the answer just in case someone else needs this.

            ...

            ANSWER

            Answered 2020-May-31 at 02:58

            I made a function in my tools file (holds all functions used throughout the project to make my life easier) to get and set a session key. Inside the VisitorTrackingMiddleware I used the function _should_track() and placed a check that looks for the session key (after _should_track() checks that sessions is installed and before all other checks), with the check_session() function in my tools file, if it doesn't exist, the function creates it with the default of True (Track the user until they accept or reject) and returns an HttpResponse (left over from trying the cookie method).

            When I used the cookie method, the firefox console said the cookie will expire so I just switched to sessions another reason is that django-tracking2 runs on it.

            It seems to work very well and it didn't have a very large impact on load times, every time a request is made, that function runs and my debug tells me if it's tracking me or not and all the buttons work through AJAX. I want to run some tests to see if this does indeed work and if so, maybe I'll submit a pull request to django-tracking2 just in case someone else wants to use it.

            A Big advantage to this is that you can allow users to change their minds if they want or you can reprompt at user sign up depending on if they accepted or not. with the way check_session() is set up, I can use it in template tags and class methods as well.

            Source https://stackoverflow.com/questions/62107209

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install django-tracking

            You can download it from GitHub.
            You can use django-tracking like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/bashu/django-tracking.git

          • CLI

            gh repo clone bashu/django-tracking

          • sshUrl

            git@github.com:bashu/django-tracking.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link