Register both "window.alert" and "window.confirm" at Google Analytics.

Create a patch to easly add another native method here.

This Google Analytics approach will be used to gather evidence and see
if those messages should be ported into a non obstrusive approach, like
a modal window or other kind of notification model.