Update event code for analytics