aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/includes/ga.html
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates/includes/ga.html')
-rw-r--r--pelican-bootstrap3/templates/includes/ga.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/includes/ga.html b/pelican-bootstrap3/templates/includes/ga.html
index 2f75571..8663e73 100644
--- a/pelican-bootstrap3/templates/includes/ga.html
+++ b/pelican-bootstrap3/templates/includes/ga.html
@@ -1,4 +1,5 @@
{% if GOOGLE_ANALYTICS %}
+ <!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
@@ -13,6 +14,19 @@
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
+ </script>
+ <!-- End Google Analytics Code -->
+{% endif %}
+{% if GOOGLE_ANALYTICS_UNIVERSAL %}
+ <!-- Google Analytics Universal -->
+ <script type="text/javascript">
+ (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_UNIVERSAL }}', '{{ GOOGLE_ANALYTICS_UNIVERSAL_PROPERTY }}');
+ ga('send', 'pageview');
</script>
+ <!-- End Google Analytics Universal Code -->
{% endif %} \ No newline at end of file