added custom analytics events, updated analytics code to be next-dev specific