Skip to content

Commit 2f7f69c

Browse files
committed
Adding google annalytics to gh-pages.
1 parent 408f575 commit 2f7f69c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage']
2626

2727
# Add any paths that contain templates here, relative to this directory.
28-
templates_path = ['_templates']
28+
templates_path = ['templates']
2929

3030
# The suffix of source filenames.
3131
source_suffix = '.rst'

doc/source/templates/layout.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "!layout.html" %}
2+
{% block extrahead %}
3+
{{ super() }}
4+
<script type="text/javascript">
5+
var _gaq = _gaq || [];
6+
_gaq.push(['_setAccount', 'UA-19175962-1']);
7+
_gaq.push(['_trackPageview']);
8+
(function() {
9+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
10+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
11+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
12+
})();
13+
</script>
14+
{% endblock %}

0 commit comments

Comments
 (0)