Fix analytics scripts