Working on the DNN FIND project, I thought I would kick around a few ideas about building "importance" into a URL based on user interaction. In a old pre-DNN project, I simply had a page that processed the link click similar to the way DNN Links Module works by using LinkClick.aspx and parameters for the link information, before redirecting to the site. However, I would prefer a solution that went directly to the site, so that the Back button could be used (pressing Back would go back to the redirect page that sends you forward). Plus, I wanted something that would show the real URL in the window status, without setting it using JavaScript. So, this is what I came up with...
The following script is dynamically generated on the Search Results page to include the searchID (every unique search performed against the database has an ID):
<script>
<!--
function DNNFclk(urlID,curRank){
if(document.images){
var u="";
if (urlID) u="url="+u+"&searchID=123456"+"&rank="+curRank;
new Image().src="/DNNFindClick.aspx?"+u;}return true;}
//-->
</script>
The HTML for the link in the search results looks like this:
<a href="http://www.venexus.com" onmousedown="return DNNFclk('7890','1')">Venexus</a>
How does it work?
When a user clicks a link in the search results, it fires off a JavaScript to fetch an "image", passing in the ID for the url and search results rank. This "image" is really a page that collects the information from the user. On the page that processes the click, basically the curRank and searchID is used in the algorithm that computes the new URL importance. This allows us to track what the user clicks on in order to update the URL ranking.
I have not had the chance to add this to DNN FIND yet, but it should be a great improvement.
Ideas for DNN FIND:
By also tracking the user session, we could check the timeframe from one click to the next. If the timeframes are too close, we could DECREASE the rank. Close timeframes represent bad search results because the user did not spend any time on the site for the link they clicked.