update analytic code