I have a link in my HTML page. which a user can click and go to another web site. I have a counter variable which i want to increase only when a user does a search or click on any link on that website.
want to develope a click tracking system. at present I can track the details about a user when he clicks on any link on my website. but now my requirement is that once a user click on the link and move on to some other web site.(link opens the website for which the link is for)

I should be able to track whether he clicked on any link or made a search on that new web site.
i found some click traking tools in PHP but can any one tell me how should i do it in JAVA
thanks in advance please help.
i have one week to do this