Add analytics to base template