Add analytics code to index.html
Extract layout from index.html