Adds google analytics to the docs that will go on akka.io.

This commit is contained in:
Heather Miller 2012-03-08 21:28:37 +01:00
parent 4e22b88410
commit d4f565fb30
2 changed files with 14 additions and 0 deletions

View file

@ -11,6 +11,7 @@
{% set script_files = script_files + ['_static/effects.highlight.js'] %}
{% set script_files = script_files + ['_static/scrollTo.js'] %}
{% set script_files = script_files + ['_static/contentsFix.js'] %}
{% set script_files = script_files + ['_static/ga.js'] %}
{% set css_files = css_files + ['_static/prettify.css'] %}
{% set css_files = css_files + ['_static/base.css'] %}
{% set css_files = css_files + ['_static/docs.css'] %}

View file

@ -0,0 +1,13 @@
// check to see if this document is on the akka.io server. If so, google analytics.
if (/akka\.io/.test(document.domain)) {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21117439-1']);
_gaq.push(['_setDomainName', 'akka.io']);
_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);
})();
}