SaaS CMS has officially launched! Learn more now.

Using statistics log to get most popular pages - limited to 5?


I am using the statistics log to get the most hit pages, but I can only seem to get the five top pages. I use CMS 5 R2 SP2 and the code to get the dataset with the page id:s looks like this:


RealTimeAnalyzerView client = new RealTimeAnalyzerView();ITransformer transformer = (ITransformer)EPiServer.BaseLibrary.ClassFactory.CreateInstance(typeof(ITransformer), new object[0]);DataSet data = client.GetMaxHits(transformer.CreateURL(PageReference.StartPage))







Feb 10, 2010 13:58

Hi Magnus,

In EPiServer.LogService.exe.Config file, there is a key <EPnPublishedPagesMaxCount and default value is set to 5.

Try changing that value to whatever number you required


Doest it help?

Feb 10, 2010 14:24

No, changing that value does not change anything, it still only reports 5. I have changed the value, restarted the service and browsed many pages on the site.

Feb 11, 2010 7:51

You might get luckier with the setting "EPnMostVissitPagesMaxCount" instead.
And yes, it really spells Visit with 2 's' :-)

If left out, it will default to 5


Feb 11, 2010 10:02

Thanks Johan! I just found it using Reflector too, it was not in the example file.

Feb 11, 2010 10:39

Next issue: I'm trying to gather results from a subtree of the site (otherwise the start page will probably always be the top hit page), and I use ITransformer.CreateUrl to construct the argument for the GetMaxHits method from a PageReference. I get hits in all cases, but I get the same hits or at least I get the start page even though I'm searching nodes below the start page. Am I doing something wrong or can't this be done?


I unleashed reflector on the class and it seems the statistics are only per-site... I suppose I should find another way to exclude some nodes from the statistics, I suppose I could selectively output the log generator in the pages for example?

Edited, Feb 11, 2010 11:09
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.