I'm developing web site on java.
Site contains some texts and sponsored links.
I need to traced user click by sponsored links without javascript.
How can do that?
PS: Requirement of sponsored links provider is redirect to there server directly without us servlets or filters.
make the links point to a servlet ( or similar ) that redirects the user to the correct website and count the redictions in that servlet
In the past, I have used a javascript function to call a servlet to track the links. Logging has to come first to be sure it is run. The logging call doesn't need to be synchronous or even check for a response. Here is some pseudo-code:
SITE.logSite = function(url){
//code here to call the servlet
}
SITE.redirectSite = function(url){
location.href=url;
}
SITE.doLogAndRedirect = function(url){
this.logSite(url);
this.redirectSite(url);
}
精彩评论