moved analytics code for webtools