Added check for required eventName parameter.