Added second functionality for analytics