More in this section

Forums / Developing with Sitefinity / Most viewed pages (top 5)

Most viewed pages (top 5)

4 posts, 0 answered
  1. mexner
    mexner avatar
    98 posts
    Registered:
    06 Apr 2006
    14 Jul 2009
    Link to this post
    Has anyone created a control that will display the top 5 viewed/requested pages in a site?  Our client has a content heavy site and wants their visitors to know and easily see what content is "hot". Something similar to a tag-cloud, except for pages.

    I'm looking thru the API trying to create this myself and am not sure where to start. Does anyone from Sitefinity have an idea on how to approach this issue?

    I would intuitively think that the home page would be the most requested, so I'll be excluding that page from the result set.

    Any feedback is much appreciated, thanks!
  2. mexner
    mexner avatar
    98 posts
    Registered:
    06 Apr 2006
    16 Jul 2009
    Link to this post
    sorry to bump, any thoughts/feedback?
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 Jul 2009
    Link to this post
    Hi Mexner,

    I was going to suggest taking a look at the following blog post:
    There is a discussion there on creating a list with the most popular news articles, but you can use similar approach for pages.

    Recently I heard that Google Apps and API now allows you to use the Google Analytics API to extract any data you need, if you have a tracker on the site. That being said, you can use this API and take the Top 5 pages as well as many other statistics for your web site.

    Another approach I could think of, is to create a user control which will be placed on each page. Upon a page load, this control will "ping" a list of urls, and each ping will increase a value related to a certain url. Then you should only load that list, and sort by the number of pings each URL has received.

    I hope this helps!

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. andersleet
    andersleet avatar
    155 posts
    Registered:
    03 Jun 2009
    16 Jul 2009
    Link to this post
    I do not know of any method out of the box, but you could create your own database table to keep track of this. Then on each of your pages that you want to have 'registered' for the hits, utilize a custom control template (you don't even have to change the default layout, this is just so you have access to the code) to insert a record into your table on the Page_Load event.

    Does this help?

    Regards,
    anders
Register for webinar
4 posts, 0 answered