add analytics code to index