From 51a558b165edfddb62659425be59f1b63cea2284 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sat, 30 Apr 2016 01:20:00 -0400 Subject: [PATCH] Switch to Piwik analytics From Google Analytics --- static/404.html | 20 +++++++++++++------- static/about.html | 20 +++++++++++++------- static/contact.html | 20 +++++++++++++------- static/houses.html | 20 +++++++++++++------- templates/browse.html | 20 +++++++++++++------- templates/editor.html | 22 +++++++++++++--------- templates/stats.html | 20 +++++++++++++------- 7 files changed, 91 insertions(+), 51 deletions(-) diff --git a/static/404.html b/static/404.html index 9f3eae2..b6653a9 100644 --- a/static/404.html +++ b/static/404.html @@ -28,13 +28,19 @@ + diff --git a/static/about.html b/static/about.html index 4a5d78c..ca9d611 100644 --- a/static/about.html +++ b/static/about.html @@ -69,13 +69,19 @@ + diff --git a/static/contact.html b/static/contact.html index f1f904c..e273040 100644 --- a/static/contact.html +++ b/static/contact.html @@ -44,13 +44,19 @@ + diff --git a/static/houses.html b/static/houses.html index 6197283..0c1bdb3 100644 --- a/static/houses.html +++ b/static/houses.html @@ -56,13 +56,19 @@ if (houses.length > 0) { } + diff --git a/templates/browse.html b/templates/browse.html index ea2c520..b23cf9a 100644 --- a/templates/browse.html +++ b/templates/browse.html @@ -44,13 +44,19 @@ {{end}} + {{end}} diff --git a/templates/editor.html b/templates/editor.html index 8188a94..7b587a5 100644 --- a/templates/editor.html +++ b/templates/editor.html @@ -137,15 +137,19 @@ $publishBtn.on('click', function(e) { } }); }); + var _paq = _paq || []; + _paq.push(["setCookieDomain", "*.html.house"]); + _paq.push(["setDomains", ["*.html.house"]]); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + var u="//analytics.write.as/"; + _paq.push(['setTrackerUrl', u+'piwik.php']); + _paq.push(['setSiteId', 3]); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); + })(); - + {{end}} diff --git a/templates/stats.html b/templates/stats.html index 745a046..90d4abf 100644 --- a/templates/stats.html +++ b/templates/stats.html @@ -48,13 +48,19 @@ + {{end}}