Update analytics code for demographic tracking