Move analytics script to the template