Assume I have a website called Website A and it has some links on it to other websites. One of these links could be a link to Website B. Is there a way, using some existing solution, open source, or something you have to pay for where you can track who, what, where, etc clicked the link to go from Website A to Website B?
Website B could be Stackoverflow and my website is http://www.websiteA.com, so on my website, I have a link to http://www.stackoverflow.com. If a user clicks on http://www.stackoverflow.com from my page, I want to capture information, such as name, phone, etc (not sure if I can do this unless the user is actually logged into my website). In this case, this is a public page which anyone from anywhere can access. If I can’t do it from my website, is there a way I can tell stackoverflow that this particular person clicked on my link to get to your website and I need their information.
The method most sites use for this is to have a script on your site handle the redirect. So instead of the link being directly to:
the link goes to something like:
The ‘link’ script logs the request and then forwards them to the address (this should be done instantly, don’t give them a ‘forwarding you to Website B in 3 seconds!’ page).
Note that as a visitor to your site, I much prefer a method where the link’s destination is apparent when I hover over the link, as opposed to the method that some sites use where all you see is an id. What I mean is, instead of the link being something like:
they instead have a link like:
Showing the destination can be achieved in a few ways. One way is something like I described above, where the destination is part of the query string. Alternatively, you can use some Javascript for this. The status bar’s value can be changed with Javascript by setting the
window.statusvariable, but many browsers prevent this by default (Firefox, for example).Google has found a sneaky way around this problem by actually using Javascript to change the link instead of the status bar. When the page is loaded, the links in the results list go to their actual destinations, but every link has an
onmousedownjavascript event that changes the link when you click on it. You can see this in action by right-clicking on a link. After you’ve done that, hovering over the link will now show the true destination (Google’s click-tracking script) in the status bar instead of the result’s real URL.Of course the information displayed with any method could be a misrepresentation of where I’m actually going to be sent, but I still prefer it over seeing a meaningless id number.