Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
CMS pages related to any active campaigns contain injection which makes user browsers send requests to the statistics handler.
The installation files needed to configure the statistics handler can be downloaded from EPiServer World. The statistics handler processes statistics data coming from users and saves raw visit logs to the statistics storage.
Each request contains parameters that cannot be detected on server side. The statistics handler tries to find and parse the following information in the request query string:
<configuration>
<connectionStrings>
<add name="CmoEntities"
connectionString="metadata=res://*/Entities.CmoModel.csdl|res://*/Entities.CmoModel.ssdl|res://*/Entities.CmoModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\sqlexpress;Initial Catalog=Cmo;Integrated Security=True;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
For Safari version 3.0 and higher:
File name: safari.browser >> Download the safari.browser file
File content:
<browsers>
<browser id="Safari3Plus" parentID="Safari1Plus" >
<identification>
<userAgent match="Version/(?'version'(?'major'\d+)\.(?'minor'\d+[\.\d+]*)\w*)\s+Safari" />
</identification>
<capture>
</capture>
<capabilities>
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
</capabilities>
</browser>
<browser refID="Safari1Plus" >
<capabilities>
<capability name="browser" value="Safari" />
</capabilities>
</browser>
</browsers>
For Google Chrome:
File name: chrome.browser >> Download the crome.browser file
File content:
<browsers>
<browser id="GoogleChrome" parentID="Safari1Plus">
<identification>
<userAgent match="Chrome/(?'version'(?'major'\d+)\.(?'minor'\d+\.\d+).\d+)" />
</identification>
<capture>
</capture>
<capabilities>
<capability name="browser" value="Chrome" />
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
</capabilities>
</browser>
</browsers>
Also, because of internal ASP.NET User-Agent caching you need to add parameter in web.config:
<system.web>
<browserCaps userAgentCacheKeyLength="128" />
<configuration>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,
log4net,
Version=1.2.10.0,
Culture=neutral,
PublicKeyToken=1b44e1d426115821" />
</configSections>
<log4net>
<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level - %message%newline" />
</layout>
</appender>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="Statistics.log.txt" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd " />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="OutputDebugStringAppender" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
</configuration>
See details about handlers registration here: http://msdn.microsoft.com/en-us/library/46c5ddfy.aspx
<configuration>
<system.web>
<httpHandlers>
<add verb="GET" path="{file_mask}" type="EPiServer.Cmo.Core.Statistics.StatisticsHandler, EPiServer.Cmo.Core"/>
</httpHandlers>
</system.web>
</configuration>
<configuration>
<system.web>
<httpHandlers>
<add verb="GET" path="{file_mask}" type="EPiServer.Cmo.Core.Statistics.StatisticsHandler, EPiServer.Cmo.Core" />
</httpHandlers>
<system.web>
<system.webServer>
<handlers>
<add name="StatisticsHandler" verb="GET" path="{file_mask}" Modules="IsapiModule" scriptProcessor="FrameworkPath\aspnet_isapi.dll" resourceType="File" type="EPiServer.Cmo.Core.Statistics.StatisticsHandler, EPiServer.Cmo.Core" />
</handlers>
</system.webServer>
</configuration>
Add the following elements to register the handler:
<configuration>
<system.webServer>
<handlers>
<add name="StatisticsHandler" verb="GET" path="{file_mask}" type="EPiServer.Cmo.Core.Statistics.StatisticsHandler, EPiServer.Cmo.Core" />
</handlers>
</system.webServer>
</configuration>