def process_request(self, request):
client_id = analytics.get_client_id(request)
path = request.path
language = get_language()
headers = request.META
# FIXME: on production you might want to run this in background
try:
analytics.report_view(client_id, path=path, language=language,
headers=headers)
except Exception:
logger.exception('Unable to update analytics')
评论列表
文章目录