added metadata tracking for events