I am thinking of to add a javascript function to capture all the click events inside a html page.
So I am adding a global function that govern
window.onclick = function (e) { if (e.target.localName == 'a') { console.log('a tag clicked!'); } }
The working demo.