Added hook method before an event is tracked