aboutsummaryrefslogtreecommitdiffstats
path: root/Just-Read/templates/base.html
diff options
context:
space:
mode:
authorTobias Schmidl <tobias@schmidl.cc>2017-10-02 16:02:30 +0200
committerTobias Schmidl <tobias@schmidl.cc>2017-10-02 22:02:40 +0200
commit4551ab6bae563fd59afe7d3d857335d438b68acc (patch)
tree660c6ff265148dcce93fca52e3d26a8dc7b65c34 /Just-Read/templates/base.html
parent63937f09b199e9ffc453ede79eee7dfc048bc5a7 (diff)
downloadpelican-themes-4551ab6bae563fd59afe7d3d857335d438b68acc.tar.gz
[Just-Read] Conditionally enable Google Analytics
As I personally don't have Google Analytics, I don't want to load the script with empty default values.
Diffstat (limited to 'Just-Read/templates/base.html')
-rw-r--r--Just-Read/templates/base.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/Just-Read/templates/base.html b/Just-Read/templates/base.html
index cf31d29..d04298c 100644
--- a/Just-Read/templates/base.html
+++ b/Just-Read/templates/base.html
@@ -62,12 +62,13 @@
Proudly powered by <a href="http://alexis.notmyidea.org/pelican/">Pelican</a>.</p>
</div>
</footer>
-
+ {% if GOOGLE_ANALYTICS %}
<script>
var _gaq=[['_setAccount','{{ GOOGLE_ANALYTICS }}'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
+ {% endif %}
</body>
</html>