move production analytics code