Try our conversational search powered by Generative AI!




I've configured EPiServer CMS 5 to record stats for a website. I can see the stats in my statistics tab in Edit mode. But I can't find a way to display the stats in the website for the visitor.  Please take a look at the code below. The "TEST" in the GetMaxHits is the "siteDisplayName" in the web.config.  After running the code, the dataset contains a table "Pages", but with no rows.



RealTimeAnalyzerView client = new RealTimeAnalyzerView();

Uri address = new Uri("soap.tcp://localhost/RealTimeAnalyzerView");

Uri via = new Uri("soap.tcp://localhost/RealTimeAnalyzerView");

client.Destination = new Microsoft.Web.Services3.Addressing.EndpointReference(address, via);

DataSet data = client.GetMaxHits("TEST");

Mar 11, 2009 19:20


Replace your last line (DataSet data = client.GetMaxHits("TEST");) with:

ITransformer transformer = (ITransformer)BaseLibrary.ClassFactory.CreateInstance(typeof(ITransformer), new object[0]);

DataSet data = client.GetMaxHits(transformer.CreateURL(CurrentPage.PageLink.ID));

Mar 12, 2009 9:49

Many thanks!

One more question: When I restart the log service I loose all my URL references (although the number of hits are retrieved from the database).  Because I loose all my URL references, I'm loosing all my stats. Is there another way of fetching the data without the URLs or is there a way to store the URL references in the database?

Or should I use the TimeSpanAnalyzerView instead for the historical data? If, how do I use it?

Thanks again!


Edited, Mar 12, 2009 10:30
* 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.