Updated event-based trigger example.