How can I get stats on redirecting pages?

Posted by Community Admin on 04-Aug-2018 15:00

How can I get stats on redirecting pages?

All Replies

Posted by Community Admin on 27-Sep-2013 00:00

Anyone know if there is a way to get stats on redirecting pages?  For example, how often a redirecting page was viewed.  I noticed that the PageData object contains a property called ViewCount but it is always zero.  Any ideas?

Thanks,
Craig

Posted by Community Admin on 02-Oct-2013 00:00

Hello Craig,

Currently this property does not get updated, but it is included for future implementations. You can update it from Global.asax file in the Application_BeginRequest event like so for example:

protected void Application_BeginRequest(object sender, EventArgs e)
        
            var currentPage = SiteMapBase.GetActualCurrentNode();
            if (currentPage != null)
            
                PageManager manager = PageManager.GetManager();
                var page = manager.GetPageData(currentPage.PageId);
                if (page != null)
                
                    page.ViewsCount++;
                    manager.SaveChanges();
                
                 
            
             
        

I hope this helps.

Regards,
Pavel Benov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed