moved analytics to header (async)