开发者

How to logged the user clicks by sponsored links without javascript [closed]

开发者 https://www.devze.com 2023-04-03 14:52 出处:网络
It's difficult to tell what is bei开发者_JAVA技巧ng asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
It's difficult to tell what is bei开发者_JAVA技巧ng asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消