added Google Analytics
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
<head>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
|
||||
@@ -52,7 +55,7 @@
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<h6>Pro Member</h6>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
<div class="grid_2 alpha"><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
|
||||
10
rowers/templates/ga.html
Normal file
10
rowers/templates/ga.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ GOOGLE_ANALYTICS_PROPERTY_ID }}', '{{ GOOGLE_ANALYTICS_DOMAIN }}');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
@@ -561,7 +561,10 @@ class ViewTest(TestCase):
|
||||
|
||||
response = self.c.get('/rowers/workout/1/', form_data, follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
response = self.c.get('/rowers/workout/1/export', form_data, follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.c.get('/rowers/workout/1/interactiveplot', form_data, follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user