AdLogger pretends they can "Determine which advertisment was clicked" (see features) I am very puzzled about the technical aspect of how they manage to do this. Can somebody englight me? I tried registering on their forum but currently does not work.
It tracks what link was clicked and stores that information in a database, I don't understand why that is so unbelievable.
Specifically, JavaScript has the ability to watch for events, such as onclick (which represents the mouse clicking). In addition, it has the ability to know which element is clicked on (such as the 5th link on a page). In fact, this stuff is kinda boring-standard-fare for doing interactive Web pages. Go do a Google search on JavaScript onclick and start learning.
Looking at the source for the ad on this page: <html><head><style><!-- .ch{cursor:pointer;cursor:hand}#abg{font-family:arial,sans-serif;font-size:10px;padding:0px 1px;color:#000000;height:100%;white-space:nowrap;}.bb{overflow:hidden;width:100%;}.ad{font-family:arial,sans-serif;padding:0px 4px;font-size:13px;word-wrap:break-word;width:458px;overflow:hidden;text-align:;line-height:18px;}.ad .adt{font-size:16px;color:#000066;font-weight:bold;text-decoration:none;line-height:18px;}.ad .adu{color:#222222;text-decoration:underline;font-size:;}--></style><script><!-- function ss(w,id) {window.status = w;a = document.getElementById(id);if (a) {bi = a.href.indexOf("&nm="); if (bi < 1) {return true;}c = a.href.substring(0, bi+4); d = a.href.substring(bi+4, a.href.length);ei = d.indexOf("&");if (ei < 0) {f = d;r = '';} else {f = d.substring(0, ei);r = d.substring(ei, d.length); }var g = parseInt(f); g++;a.href= c+g+r; }return true;}function st(a) {return true;}function cs(){window.status='';} function jcc(a) {pha=document.getElementById(a); nc=pha.href.indexOf('&jca='); if(nc>=1) return; sv=String.fromCharCode(51,50,49,52,57,51,56,52,53); sv=sv.slice(0,4); jca=(4723)+parseInt(sv); if (a=='aw0') {jca+=(1581);} else {jca=0;} phb=pha.href+'&jca='+jca; pha.href=phb;} function ha(a){ pha=document.getElementById(a); nhi=pha.href.indexOf("&nh=");if(nhi < 1) {phb=pha.href+"&nh=1";} pha.href=phb; jcc(a); }function ca(a) { pha=document.getElementById(a); nci=pha.href.indexOf("&nc=");if(nci < 1) {phb=pha.href+"&nc=1";} pha.href=phb; jcc(a); top.location.href=document.getElementById(a).href;}function ga(o,e) {if (document.getElementById) {a=o.id.substring(1);p = "";r = "";g = e.target;if (g) {t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h)r = h.id;}} else {h = e.srcElement;f = h.parentNode;if (f)p = f.id;t = h.id;}if (t==a || p==a || r==a)return true;pha=document.getElementById(a); nbi=pha.href.indexOf("&nb=");if(nbi < 1) {phb=pha.href+"&nb=1";} pha.href=phb; jcc(a); top.location.href=document.getElementById(a).href;}}//--></script></head><body bgcolor=#ff8888 text=#222222><table bgcolor=#ffcccc border=0 cellpadding=0 cellspacing=0 height=100% width=100%><tr><td width=1 rowspan=6 bgcolor=#ff8888 height=100%><img height=1 width=1 alt=""/></td><td height=1 bgcolor=#ff8888><img height=1 width=1 alt=""/></td><td width=1 rowspan=6 bgcolor=#ff8888 height=100%><img height=1 width=1 alt=""/></td></tr><tr><td height=1><img height=1 width=1 alt=""/></td></tr><tr><td height=100%><table border=0 cellpadding=0 width=100% cellspacing=0 height=100% ><tr><td onFocus="ss('go to ChevyPriceQuote.com','aw0')"onMouseOver="return ss('go to ChevyPriceQuote.com','aw0')"onMouseOut="cs()"onClick="ga(this,event)" id=taw0 height=100% class=ch valign=middle><div class=ad><a onFocus="ss('go to ChevyPriceQuote.com','aw0')"onMouseOver="return ss('go to ChevyPriceQuote.com','aw0')"onMouseOut="cs()" id=aw0 href="/pagead/iclk?sa=l&ai=BtLFOz9_HReaOBJPWhAP4j9jHBZXt7x6d9f-zAr3fhZQGABABGAEgpb31ATAAOABQ5vL_gAJgyb7JhsSjyBeYAdLwqBCgAYm32f0DqgEKNDQ2Nzg0MzMxMbIBF2ZvcnVtcy5kaWdpdGFscG9pbnQuY29tugEJNDY4eDYwX2FzyAEB2gE2aHR0cDovL2ZvcnVtcy5kaWdpdGFscG9pbnQuY29tL3Nob3d0aHJlYWQucGhwP3Q9MjM2ODIwgAIBmAKYDMACAagDAQ&num=1&adurl=http://www.ChevyPriceQuote.com/&client=ca-pub-5676236325709660&nm=0" class=adt target=_top>Courtesy Chevrolet - PHX</a> - Hassle Free Online Price Quotes <br/>Courtesy Chevrolet Sells For Less! <span class=adu dir=ltr>ChevyPriceQuote.com</span></div></td></tr></table></td></tr><tr><td height=1><img height=1 width=1 alt=""/></td></tr><tr><td height=13 bgcolor=#ff8888 valign=bottom><div class=bb><table border=0 cellpadding=0 cellspacing=0 width=100% dir=ltr><tr><td align=left ><a href="http://services.google.com/feedback/abg?url=http://forums.digitalpoint.com/showthread.php%3Ft%3D236820&hl=en&client=ca-pub-5676236325709660&adU=ChevyPriceQuote.com&adT=Courtesy+Chevrolet+-+PHX&done=1" target=_blank id=abg>Ads by Google</a></td><td align=right ><a href="https://adwords.google.com/select/OnsiteSignupLandingPage?client=ca-pub-5676236325709660&referringUrl=http://forums.digitalpoint.com/showthread.php%3Ft%3D236820%23post2261919&hl=en&gl=US" target=_blank style="font-size:10px;font-family:arial,sans-serif;color:#000000">Advertise on this site</a></td></tr></table></div></td></tr><tr><td height=1 bgcolor=#ff8888><img height=1 width=1 alt=""/></td></tr></table></body></html> Code (markup): You can clearly see the adurl variable in the script.
No. It's pure javascript that you can made yourself too. I'ts using javascript events to detect when cursor moves in and out other "iframes" (specifically over that iframe called "googlesyndication.com") and storing on local variables some info. For example, is getting "destination URL" from StatusBar (although by default it's no possible now on IE7 or FireFox configured with default values). Later when the browser is going to change to other page, another javascript event is launched and send that "variables stored" info (IP, your URL, destination URL, ...) to your server to be stored on your Database.