analytics code replacement