Add query for analytics