moves analytics code back to head