Make the analytics testable again