Moving analytic code back to <head>