{ "info": { "author": "Jan Willems", "author_email": "jw@elevenbits.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Topic :: Internet :: Log Analysis", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Page Counters", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Security", "Topic :: System :: Monitoring", "Topic :: Utilities" ], "description": "``django-user-tracking`` is a simple attempt at keeping track of visitors to\nDjango-powered Web sites. It also offers basic blacklisting capabilities.\n\nThe official repository for ``django-user-tracking`` is at\nhttp://bitbucket.org/elevenbits/django-user-tracking. Please file\nany tickets there.\n\nFeatures\n========\n\nTracks the following information about your visitors:\n\n * Session key\n * IP address\n * User agent\n * Whether or not they are a registered user and logged in\n * Where they came from (http-referer)\n * What page on your site they last visited\n * How many pages on your site they have visited\n\nAllows user-agent filtering for visitor tracking\n\nAutomatic clean-up of old visitor records\n\nCan ban certain IP addresses, rendering the site useless to visitors from\nthose IP's (great for stopping spam)\n\nThe ability to have a live feed of active users on your website\n\nTemplate tags to:\n\n * display how many active users there are on your site\n * determine how many active users are on the same page within your site\n\nOptional \"Active Visitors Map\" to see where visitors are in the world\n\nRequirements\n============\n\nThis Django tracking module is based on work from Josh VanderLinden.\nIt currently works with Django 1.7. Some features, like the map use\njQuery 2.2.\n\nTODO: check this\nIf you wish to use a Google Map to display where your visitors are probably at,\nyou must have a `Google Maps API key\n`_, which is free. You\nare required to have the `GeoIP C API library\n`_ installed.\nYou might want to grab the `GeoLite City binary\n`_ unless you are a paying MaxMind\ncustomer. This is the data file that ``django-tracking`` uses to translate an\nIP into a location on the planet. Configuring this feature is discussed later.\n\nInstallation\n============\n\nDownload ``django-user-tracking`` using pip::\n\n pip install django-user-tracking\n\nto download and install ``django-user-tracking``.\n\nConfiguration\n=============\n\nFirst of all, you must add this project to your list of ``INSTALLED_APPS`` in\n``settings.py``::\n\n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n ...\n 'tracking',\n ...\n )\n\nRun ``manage.py syncdb``. This creates a few tables in your database that are\nnecessary for operation.\n\nDepending on how you wish to use this application, you have a few options:\n\nVisitor Tracking\n----------------\n\nAdd ``tracking.middleware.VisitorTrackingMiddleware`` to your\n``MIDDLEWARE_CLASSES`` in ``settings.py``. It must be underneath the\n``AuthenticationMiddleware``, so that ``request.user`` exists.\n\nAutomatic Visitor Clean-Up\n++++++++++++++++++++++++++\n\nIf you want to have Django automatically clean past visitor information out\nyour database, put ``tracking.middleware.VisitorCleanUpMiddleware`` in your\n``MIDDLEWARE_CLASSES``.\n\nIP Banning\n----------\n\nAdd ``tracking.middleware.BannedIPMiddleware`` to your ``MIDDLEWARE_CLASSES``\nin ``settings.py``. I would recommend making this the very first item in\n``MIDDLEWARE_CLASSES`` so your banned users do not have to drill through any\nother middleware before Django realizes they don't belong on your site.\n\nVisitors on Page (template tag)\n-------------------------------\n\nMake sure that ``django.core.context_processors.request`` is somewhere in your\n``TEMPLATE_CONTEXT_PROCESSORS`` tuple. This context processor makes the\n``request`` object accessible to your templates. This application uses the\n``request`` object to determine what page the user is looking at in a template\ntag.\n\nActive Visitors Map\n===================\n\nIf you're interested in seeing where your visitors are at a given point in\ntime, you might enjoy the active visitor map feature. Be sure you have added a\nline to your main URLconf, as follows::\n\n from django.conf.urls.defaults import *\n\n urlpatterns = patterns('',\n ....\n (r'^tracking/', include('tracking.urls')),\n ....\n )\n\nNext, set a couple of settings in your ``settings.py``:\n\n* ``GOOGLE_MAPS_KEY``: Your very own Google Maps API key\n* ``TRACKING_USE_GEOIP``: set this to ``True`` if you want to see markers on\n the map\n* ``GEOIP_PATH``: set this to the absolute path on the filesystem of your\n ``GeoIP.dat`` or ``GeoIPCity.dat`` or whatever file. It's usually something\n like ``/usr/local/share/GeoIP.dat`` or ``/usr/share/GeoIP/GeoIP.dat``.\n* ``GEOIP_CACHE_TYPE``: The type of caching to use when dealing with GeoIP data:\n\n * ``0``: read database from filesystem, uses least memory.\n * ``1``: load database into memory, faster performance but uses more\n memory.\n * ``2``: check for updated database. If database has been updated, reload\n filehandle and/or memory cache.\n * ``4``: just cache the most frequently accessed index portion of the\n database, resulting in faster lookups than ``GEOIP_STANDARD``, but less\n memory usage than ``GEOIP_MEMORY_CACHE`` - useful for larger databases\n such as GeoIP Organization and GeoIP City. Note, for GeoIP Country,\n Region and Netspeed databases, ``GEOIP_INDEX_CACHE`` is equivalent to\n ``GEOIP_MEMORY_CACHE``. *default*\n\n* ``DEFAULT_TRACKING_TEMPLATE``: The template to use when generating the\n visitor map. Defaults to ``tracking/visitor_map.html``.\n\nWhen that's done, you should be able to go to ``/tracking/map/`` on your site\n(replacing ``tracking`` with whatever prefix you chose to use in your URLconf,\nobviously). The default template relies upon jQuery for its awesomeness, but\nyou're free to use whatever you would like.\n\nUsage\n=====\n\nTo display the number of active users there are in one of your templates, make\nsure you have ``{% load tracking_tags %}`` somewhere in your template and do\nsomething like this::\n\n {% visitors_on_site as visitors %}\n

\n {{ visitors }} active user{{ visitors|pluralize }}\n

\n\nIf you also want to show how many people are looking at the same page::\n\n {% visitors_on_page as same_page %}\n

\n {{ same_page }} of {{ visitors }} active user{{ visitors|pluralize }}\n {% ifequal same_page 1 %}is{% else %}are{% endifequal %} reading this page\n

\n\nIf you don't want particular areas of your site to be tracked, you may define a\nlist of prefixes in your ``settings.py`` using the ``NO_TRACKING_PREFIXES``. For\nexample, if you didn't want visits to the ``/family/`` section of your website,\nset ``NO_TRACKING_PREFIXES`` to ``['/family/']``.\n\nIf you don't want to count certain user-agents, such as Yahoo!'s Slurp and\nGoogle's Googlebot, you may add keywords to your visitor tracking in your\nDjango administration interface. Look for \"Untracked User-Agents\" and add a\nkeyword that distinguishes a particular user-agent. Any visitors with the\nkeyword in their user-agent string will not be tracked.\n\nBy default, active users include any visitors within the last 10 minutes. If\nyou would like to override that setting, just set ``TRACKING_TIMEOUT`` to however\nmany minutes you want in your ``settings.py``.\n\nFor automatic visitor clean-up, any records older than 24 hours are removed by\ndefault. If you would like to override that setting, set\n``TRACKING_CLEANUP_TIMEOUT`` to however many hours you want in your\n``settings.py``.\n\nGood luck! Please contact me with any questions or concerns you have with the\nproject!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/elevenbits/django-user-tracking", "keywords": "django,tracking,visitors", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-user-tracking", "package_url": "https://pypi.org/project/django-user-tracking/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-user-tracking/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/elevenbits/django-user-tracking" }, "release_url": "https://pypi.org/project/django-user-tracking/0.4.11/", "requires_dist": null, "requires_python": null, "summary": "Basic visitor tracking and blacklisting for Django", "version": "0.4.11" }, "last_serial": 1251108, "releases": { "0.4.10": [ { "comment_text": "", "digests": { "md5": "ea054c697510b5bf8877fe4c11143501", "sha256": "b7d88784ff3fba168bf00828477d985becc14cd9d74c3ba7d69149433e1831b9" }, "downloads": -1, "filename": "django-user-tracking-0.4.10.tar.gz", "has_sig": false, "md5_digest": "ea054c697510b5bf8877fe4c11143501", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1986148, "upload_time": "2014-09-27T06:22:09", "url": "https://files.pythonhosted.org/packages/55/e3/9f545d11e5590bda0b28c074ff130402d32119b3eceba5d63a290b99afbc/django-user-tracking-0.4.10.tar.gz" } ], "0.4.11": [ { "comment_text": "", "digests": { "md5": "3abe9733a9ac81354661030737c7bf68", "sha256": "5eb2c7321bd9872e08e6cbb7b5b401909bdbc7fd3c0c5263b4e441d7a011c8dd" }, "downloads": -1, "filename": "django-user-tracking-0.4.11.tar.gz", "has_sig": false, "md5_digest": "3abe9733a9ac81354661030737c7bf68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1987336, "upload_time": "2014-10-07T20:38:31", "url": "https://files.pythonhosted.org/packages/f3/f4/1b7e70ba2352c9eea5a593a53164107cf7a2b7856dbe1b5a31a67fef0666/django-user-tracking-0.4.11.tar.gz" } ], "0.4.9": [ { "comment_text": "", "digests": { "md5": "c30c82edc02cb94dc2c77f06818e4b3d", "sha256": "082f0bf53e34e6700bb5fd7e45f64bf048b158973f0ccf9ed646fe696fca29e3" }, "downloads": -1, "filename": "django-user-tracking-0.4.9.tar.gz", "has_sig": false, "md5_digest": "c30c82edc02cb94dc2c77f06818e4b3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1986123, "upload_time": "2014-09-27T06:12:01", "url": "https://files.pythonhosted.org/packages/63/dd/166545f41d74f6fe4349c6f1047239fc1931ef55641b731c882ce00701b4/django-user-tracking-0.4.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3abe9733a9ac81354661030737c7bf68", "sha256": "5eb2c7321bd9872e08e6cbb7b5b401909bdbc7fd3c0c5263b4e441d7a011c8dd" }, "downloads": -1, "filename": "django-user-tracking-0.4.11.tar.gz", "has_sig": false, "md5_digest": "3abe9733a9ac81354661030737c7bf68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1987336, "upload_time": "2014-10-07T20:38:31", "url": "https://files.pythonhosted.org/packages/f3/f4/1b7e70ba2352c9eea5a593a53164107cf7a2b7856dbe1b5a31a67fef0666/django-user-tracking-0.4.11.tar.gz" } ] }