david.thornton-pop
-
6/27/2012 10:58:43 AM
Use Web Analytics Page Views to find most popular pages
I'm trying to implement some functionality where I can get the 5 most popular documents of a specific Document Type and display them in the sidebar of the site.
I've turned on Web Analytics and Page View tracking is working fine. I can get Page Views for a specific node by doing the following:
HitsInfoProvider.GetObjectHitCount(CMSContext.CurrentSiteID, CMSContext.CurrentDocument.NodeID, HitsIntervalEnum.Year, "pageviews", new DateTime(1753, 1, 1), new DateTime(9999, 1, 1));
This works great, but it only allows me to get the PageViews for a specific page and not get the top "X" documents for a document type.
Does anybody have any thoughts on how I can accomplish this properly?
|