Skip to content

zensimilia/django-utm-cookies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

django-utm-cookies

Django middleware that Store UTM parameters in cookies.

Installing

Clone or copy repo to root of your project directory. Then add 'utm.middleware.utm_cookies_middleware' to the end your MIDDLEWARE in settings.py. For example:

MIDDLEWARE = [
    'django.middleware.common.CommonMiddleware',
    ...
    'utm.middleware.utm_cookies_middleware',
]

Settings

Once you've installed it, you need place some options to settings.py in UTM section:

UTM = {
    'LIFETIME': 60 * 30,
    'EXCEPT': ['utm_term', 'utm_content'],
}
  • LIFETIME : (int) Max age of UTM cookies in seconds before we can update they.
    Default: 86400 (24h)

  • EXCEPT : (list) Exclude listed parameters from processing.
    Default: []

Requirements

Tested on Python 3.6 and Django 2.2

About

Django middleware that Store UTM parameters in cookies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages