added analytics to template