Making the event and pageview handling more fault tolerant with try/catch blocks.