django-tracking2 | tracking2 tracks the length of time visitors | Analytics library

 by   bruth Python Version: 0.5.1 License: BSD-2-Clause

kandi X-RAY | django-tracking2 Summary

kandi X-RAY | django-tracking2 Summary

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

django-tracking2 tracks the length of time visitors and registered users spend on your site. Although this will work for websites, this is more applicable to web applications with registered users. This does not replace (nor intend) to replace client-side analytics which is great for understanding aggregate flow of page views.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              django-tracking2 has a low active ecosystem.
              It has 190 star(s) with 68 fork(s). There are 13 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 16 open issues and 31 have been closed. On average issues are closed in 40 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of django-tracking2 is 0.5.1

            kandi-Quality Quality

              django-tracking2 has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

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

            kandi-Reuse Reuse

              django-tracking2 releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed django-tracking2 and discovered the below as its top functions. This is intended to give you an instant insight into django-tracking2 implemented functionality, and help decide if they suit your requirements.
            • Track the request
            • Return the total seconds of a datetime timedelta
            • Refresh the visitor row
            • Determine if the request should be tracked
            • Add a new pageview
            • Extract the ip address from the request
            • Called when a session ends
            • Returns the cache key for the given instance
            • Return a list of guests
            • Returns a cache query set for this instance
            • Return the statistics for the site
            • Filter queryset
            • Returns all active sessions
            • Return the version string
            • Return all user s visit history
            • Return the statistics for the visitor
            • Store the instance in the cache
            • Return all registered users
            Get all kandi verified functions for this library.

            django-tracking2 Key Features

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

            django-tracking2 Examples and Code Snippets

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

            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-tracking2

            Add tracking to your project’s INSTALLED_APPS setting:. If you use Django 1.8+ tracking app should follow the app with your user model.

            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
            Install
          • PyPI

            pip install django-tracking2

          • CLONE
          • HTTPS

            https://github.com/bruth/django-tracking2.git

          • CLI

            gh repo clone bruth/django-tracking2

          • sshUrl

            git@github.com:bruth/django-tracking2.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