Skip to content

Commit

Permalink
Move analytics code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Oct 8, 2013
1 parent edc8313 commit 84a31d1
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions readthedocs/templates/sphinx/layout.html
Expand Up @@ -31,22 +31,19 @@
{% block extrahead %}
{{ super() }}
<!-- RTD Extra Head -->
{% if not self.htmltitle %}
<script type="text/javascript">
// This is included here for theme's that don't have a htmltitle template.
var doc_version = "{{ current_version }}";
var doc_slug = "{{ slug }}";
var page_name = "{{ pagename }}";
</script>
{% endif %}
{#
We include the media servers version here so we can update rtd.js across all
documentation without rebuilding every one. If this script is embedded in each build, then updating the file across all docs is basically impossible.
#}
<script type="text/javascript" src="{{ MEDIA_URL }}javascript/rtd.js"></script>
<link rel="stylesheet" href="{{ MEDIA_URL }}css/rtd-shim.css" type="text/css" />

{% if not self.footer %}
<!-- RTD Analytics Code -->
<!-- Included in the header because you don't have a footer block. -->
<script type="text/javascript">
Expand All @@ -61,7 +58,6 @@
})();
</script>
<!-- end RTD Analytics Code -->
{% endif %}

<!-- end RTD <extrahead> -->
{% endblock %}
Expand Down Expand Up @@ -233,18 +229,6 @@ <h3>{{ _('This Page') }}</h3>
</ul>
</div>
</div>
<!-- RTD Analytics Code -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17997319-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

{% if analytics_code %}
<!-- User Analytics Code -->
Expand Down

0 comments on commit 84a31d1

Please sign in to comment.