from django.conf import settings
from django.template.loader import render_to_string

def analytics(request):
    """
    Returns analytics code.
    """
if not settings.DEBUG:
    pass
Deploying Google Analytics With Django