Let me reformulate, as the answer https://stackoverflow.com/questions/951907/where-are-my-visitors-going was absolutely correct, but my question not precise enough 😉
How does one track with Java Script where the visitors are going? (From a technical standpoint.)
Is the idea to execute a code every time a link is pressed? If yes, does this have to be specified in the <a>-tag itself, i.e., <a href="..." onmousedown="return mycode(this)">, or can this be done globally without having to mention it for every link?
I don’t want the specifics of any code (as there is GoogleAnalytics etc.), I just want to know generally how it could work.
Btw, you guys are really quick!
You can write an event that records visitor activity per anchor tag or you can write a script that scans the document and does it for you (which is what Google Analytics does). If you choose to use a script, make sure you put it at the end of the document so that your web page is as responsive as possible.
You can easily iterate through anchor tags as follows (untested):