 <p>For attaching an EventListener on every link, and retrieving the href on click without jQuery, I would probably do something like this:</p> <pre><code>function trackClick(event) { alert(this.href); } window.onload = function() { var links = document.getElementsByTagName('a'); for (var i = 0; i &lt; links.length; i++) { links[i].addEventListener('click', trackClick, false); }; } </code></pre>