Add analytics code into a dedicated file