Set the events and elements array in global config