django-google-analytics
django-google-analytics copied to clipboard
allow GA code to come straight from settings.py
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)