Shifts analytics code to header