Search
  
 
Mitchel Sellers' DotNetNuke, .NET, and Other Topics BlogMinimize
 
 
Subscribe To Blog Updates by E-Mail

Current Articles | Categories | Search | Syndication

   
 Identifying Popular Links Portal Wide
By IowaComputerGurus Host on Wednesday, June 06, 2007 @ 10:00 AM
 
  217 Views :: 6 Comments :: :: DotNetNuke, SQL
  
 

After having my DNN sites up and running for almost a year I was very curious to see exactly how many clicks I had on the various tracked links.  I started to look around and was getting tired of clicking "Edit:" on each link to view the information.  So I created this simple query to quickly pull the links in the "Most clicked" order. 

This is a very primitive query that gets the module name, link, click count and last click time.  For documents loaded in the documents module you will only get the file id of the file, but it at least helps to illustrate the activity.

SELECT m.ModuleTitle, t.url, t.Clicks, t.LastClick
FROM URLTracking t
    
INNER JOIN Modules m
        
ON (t.ModuleId m.ModuleID)
WHERE t.PortalId 0
    
AND TrackClicks 1
ORDER BY t.Clicks DESC

You will need to edit the PortalId portion of the where clause to ensure that you reference the correct portal.

 
  
 Share/Save This Article 
 

Use the below controls to save this article to one of many popular social bookmarking sites!

   kick it on DotNetKicks.com  
 
  
 Article Rating 
  
  
 Article Comments 
 
By Tom Kraak @ Sunday, June 10, 2007 10:16 AM
While DNN's ability to track links is good for reporting purposes, it does not help your SEO efforts.

So I guess now it becomes a question of priority.

By Mitchel Sellers @ Sunday, June 10, 2007 12:14 PM
That is a very valid point since my guess is that most robots do not follow the links..

By bonder @ Thursday, June 21, 2007 11:10 PM
It can help your SEO efforts if you want "dynamic links" that will prevent spiders from following the link and thus bleeding your PageRank.

By drew @ Friday, July 06, 2007 7:27 PM
simple note to this sql: augment the table names to match your dnn table name qualifier...

By Déclic Vidéo FX @ Sunday, July 08, 2007 3:21 AM
Hello,

This query is great, but FileID are not very interesting. Can't you join the table to obtain the name of the file ???

DV FX

By Mitchel Sellers @ Monday, July 09, 2007 3:45 AM
DV FX,

I'll look into that....give me a bit of time to look into it.

Click here to post a comment
 

 Add to Technorati Favorites
 Print   
 
  
 
ArchiveMinimize
 
 
 Print   
 
  
 
CategoriesMinimize
 
 
 Print   
 
  
 
DonateMinimize
 
 

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content. 

 Print