New analytics code