recordEvent acually records an event