adds analytics to main layout