Complete adding google analytics to docs

theindex.html doesn't have analytics because I don't
want to deal with global variables