Add GOOGLE_ANALYTICS_PROPERTY_IDS for dynamic set ID
This commit is contained in:
parent
007fc794c3
commit
2ad984504c
5 changed files with 18 additions and 18 deletions
|
|
@ -1,16 +0,0 @@
|
|||
from django.conf import settings
|
||||
|
||||
|
||||
def google_analytics(request):
|
||||
"""
|
||||
Use the variables returned in this function to
|
||||
render your Google Analytics tracking code template.
|
||||
"""
|
||||
ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_ID', False)
|
||||
ga_domain = getattr(settings, 'GOOGLE_ANALYTICS_DOMAIN', False)
|
||||
if not settings.DEBUG and ga_prop_id and ga_domain:
|
||||
return {
|
||||
'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id,
|
||||
'GOOGLE_ANALYTICS_DOMAIN': ga_domain,
|
||||
}
|
||||
return {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue