moved analytics to layout