Added event tracking for analytics