Add analytic code