Develop pull request from meng

Add a boolean switch to allow insertValue method can choose to add event data into the last same type event, or last event without checking event type