Try our conversational search powered by Generative AI!

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

Vote:
 

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))

 

 

 

 

 

 

#36771
Feb 10, 2010 13:58
Vote:
 

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

<EPnPublishedPagesMaxCount>5</EPnPublishedPagesMaxCount>

Doest it help?

#36773
Feb 10, 2010 14:24
Vote:
 

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.

#36804
Feb 11, 2010 7:51
Vote:
 

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

/johan

#36808
Feb 11, 2010 10:02
Vote:
 

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

#36810
Feb 11, 2010 10:39
Vote:
 

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?

Edit:

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?

#36811
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.