From 5d4a6fc279ce8e846cc8b84469ccdd6b9b5069fe Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 7 Aug 2014 20:44:59 -0400 Subject: [PATCH] Add support for GA at least for the initial page load. --- endpoints/common.py | 1 + templates/base.html | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/endpoints/common.py b/endpoints/common.py index aa19339e5..fe09104ca 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -175,6 +175,7 @@ def render_page_template(name, **kwargs): feature_set=json.dumps(features.get_features()), config_set=json.dumps(getFrontendVisibleConfig(app.config)), mixpanel_key=app.config.get('MIXPANEL_KEY', ''), + google_analytics_key=app.config.get('GOOGLE_ANALYTICS_KEY', ''), sentry_public_dsn=app.config.get('SENTRY_PUBLIC_DSN', ''), is_debug=str(app.config.get('DEBUGGING', False)).lower(), show_chat=features.OLARK_CHAT, diff --git a/templates/base.html b/templates/base.html index c2159807b..d599565f5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -76,6 +76,20 @@ typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]); mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug }} }); {% endif %} + +{% if google_analytics_key %} + +{% endif %} +