django-google-analytics icon indicating copy to clipboard operation
django-google-analytics copied to clipboard

allow GA code to come straight from settings.py

Open admackin opened this issue 12 years ago • 0 comments

There are uses cases (e.g. mine) where we may not want to have a full-blown sites framework, or configurability from admin, but simply want to use an analytics code set in settings.py. This change allows that, preferring to use settings.GOOGLE_ANALYTICS_CODE when the code is not explicitly provided for the admin tag. When this isn't set, it falls back to the standard attempt to get the value from sites (not sure if this would be better the other way around, but this way works for me)

admackin avatar Jul 16 '12 12:07 admackin