updated analytics code for demographic info