1/** 2 * @author: Danny Ng (http://www.dannytalk.com) 3 * @date: 30/08/08 4 * @updated: 26/09/08 5 * @notes: Free to use and distribute without altering this notice. Would appreciate a link back. 6 * @usage: Place the following code before the </body> tag and after <a href="http://www.dannytalk.com/tag/google/">google</a> analytics code, 7 * 8 * <script type="text/javascript" src="<PATH-TO-SCRIPT>"></script> 9 * <script type="text/javascript"> 10 * dtalk_ga.applyVirtualExits(); 11 * </script> 12 */ 13 14var dtalk_ga = { 15 applyVirtualExits: function() { 16 var trackPage = function(a) 17 { 18 var domain_name = document.location.toString().toLowerCase().split('/')[2]; 19 var exit_domain = a.href.split('/')[2].toLowerCase(); 20 if (domain_name.toLowerCase().indexOf(exit_domain) == -1) 21 { 22 if (typeof pageTracker != 'undefined') 23 pageTracker._trackPageview('/exit/' + a.href); 24 } 25 }; 26 var anchors = document.getElementsByTagName('a'); 27 for (var i = 0; i < anchors.length; i++) 28 { 29 if (anchors[i].href && anchors[i].href != (document.location + '#')) 30 { 31 if (typeof anchors[i].onclick == 'undefined') 32 anchors[i].onclick = function(e) { 33 trackPage(this); 34 }; 35 else if (typeof anchors[i].onclick == 'function') 36 { 37 var old_onclick = anchors[i].onclick; 38 anchors[i].onclick = function(e) { 39 old_onclick(); 40 trackPage(this); 41 }; 42 } 43 } 44 } 45 } 46};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.