Table of Contents
Introduction
This document describes how to configure Live Monitor in EPiServer CMS.
Live Monitor is a module for EPiServer CMS that visualizes the current traffic
on an EPiServer CMS-based website, and can be used for monitoring the
traffic to your website and following the behavior of visitors.
Live Monitor can be used as-is, directly from the installation with EPiServer CMS,
please note though it is possible to change some of the default settings if required.
In this document the various configuration options are described in more detail. Live Monitor
is installed on the system through the (msi) installation file and deployed to a site through Deployment Center.
Please note if your solution is set up in a load balancing environment see the the Interval based updates
section for some helpful information.
Template changes required for use Live Monitor
A special placeholders for the tracking scripts need to be added to the sites master page if site
templates do not render required client resources for default areas Header and Footer.
One placeholder should be placed inside the <head> tag and another one before the
closing </body> tag. If Live Monitor is installed on ASP.NET MVC site a special
HTML helpers should be used:
XML
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<%@ Import Namespace="EPiServer.Framework.Web" %>
<%@ Import Namespace="EPiServer.Framework.Web.Mvc.Html" %>
<html>
<head runat="server">
�
<strong><%= Html.RequiredClientResources(RenderingTags.Headerstrong>
</head>
<body>
�
<strong><%= Html.RequiredClientResources(RenderingTags.Footerstrong>
</body>
</html>
if Live Monitor is installed on ASP.NET Web Forms site a special WebControls should be used:
XML
<%@ Master Language="C#" AutoEventWireup="false" CodeBehind="Site.master.cs" Inherits="EPiServer.Templates.Alloy.Views.MasterPages.Site" %>
<html>
<head runat="server">
�
<strong><EPiServer:RequiredClientResources RenderingArea="Header" ID="RequiredResourcesHeader" runat="server" /></strong>
</head>
<body>
�
<strong><EPiServer:RequiredClientResources RenderingArea="Footer" ID="RequiredResourcesFooter" runat="server" /></strong>
</body>
</html>
See Managing Client Resources when working with EPiServer CMS
Client configuration
It is possible to override default client behavior by changing init parameters on the client control
(these changes should be made in the SilverlightApplication.ascx file). These are:
- traceservice – address to the trace service.
- visitorservice –address to the visitor service.
- rememberlayout (false) – if the client should remember the previously expanded nodes and on which positions they were at.
- preloadDepth (3) – by default the client automatically loads nodes thee levels down, increasing this value can have a
negative impact on the client performance. The rest of the nodes will be loaded on demand. Visitors that are on nodes
that haven’t been loaded are not shown in the client.
- rootNodeId – page Id for the root node.
- isStatisticsControlsVisible – gauges visibility, default true.
- isVisitorListExpanded – is the visitor list expanded, default false.
- moveToHistoryAfter (2 min) – Number of minutes before the users are considered inactive, default is 2 min.
- removeFromHistoryAfter (5 min) – Number of minutes before users are removed from the history list, default is 5 minutes.
- pollTimeout (0ms) – If pollTimeout is set to a value greater than zero EPiTrace will poll for visitor information
instead of using the Duplex binding.
Server configuration
Application contents
Live Monitor consists of a Silverlight web browser plug-in for visualization of visitor
movements on the web site and services providing the silverlight application with visitor information.
- EPiTrace.xap – Silverlight client application
- TrackerHandler.ashx – Handler registering page visits
- TraceService.svc & VisitorService.svc – Services providing the silverlight client application with visitor and page data.
- Default.aspx – sample web page for showing the EPiTrace client application in a browser.
Manual Database set-up
Run epitraceHits.sql in your EPiServer database. This will create the table epitraceHits and the
stored procedures epitraceRegisterVisit and epitraceMaintenance.
Scheduled database job
The stored procedure epitraceMaintenance needs to be set-up to run at least every 24 hours.
The stored procedure removes information about old visits rebuilds indexes on the epitraceHits table.
Interval based updates (load balanced environments)
Live Monitor can be set up to handle client updates in two different ways. The default set-up pushes
visitor updates to the listening Live Monitor silverlight clients as soon as a visit is recorded by the visitor handler.
This set-up requires that the visitor logging handler resides in the same web application as the visitor service,
since these updates are done with direct communication between the logging handler and the visitor service.
The second set-up pushes updates at a configurable interval to the clients. When a visitor views a page the
visit is recorded to database by the visitor logging handler, but the visitor service isn’t notified.
The visitor service is instead set-up to load visits from the database at a configurable interval and push to the
listening Live Monitor clients. This set-up doesn’t require that the visitor service and the logging handler reside
in the same web application.
Interval based visitor updates must be configured in web.config. This requires that a configuration section is registered in web.config.
XML
<sectionGroup name="episerverModules">
<section name="episerver.epiTrace"
type="EPiServer.Trace.CMS.Configuration.EPiTraceSection"
allowLocation="false"/>
</sectionGroup>
Then the actual configuration must be added as well:
XML
<episerverModules>
<episerver.epiTrace usePolling="true" pollingInterval="5" />
</episerverModules>
Further information on the configuration properties:
- usePolling - turns on the interval based updates
- pollingInterval - determines the number of seconds between client updates
Using Live Monitor on Websites with Multiple Site Bindings
Live Monitor relies on WCF services for communication between the Silverlight
client and the web server. If you are using multiple site bindings (for example,
http://mysite.com and http://www.mysite.com) on your site, there is some specific
configuration required.
If your site is running on ASP.NET 4 or later you can enable multiple site
bindings using a configuration setting specific for this purpose. This
configuration setting is a requirement if you want to run Live Monitor on
multiple sites in an EPiServer Enterprise setup with multiple bindings.
XML
<configuration>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" .../>
</system.serviceModel>
</configuration>
If your site are running ASP.NET 3.5 you will need to select one specific
address where Live Monitor should be available by configuring the “base address
prefix filters”.
XML
<configuration>
<system.serviceModel>
<serviceHostingEnvironment ...>
<baseAddressPrefixFilters>
<add prefix="http://mysite.com">
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
</system.serviceModel>
</configuration>
Using Live Monitor on Websites through HTTPS Scheme
Open web.config and set bindingConfiguration of the TraceService endpoint to a
binding with the security mode set to “transport” as shown in the following
example:
XML
<system.serviceModel>
<services>
<service behaviorConfiguration="EPiServer.Trace.Services.TraceServiceBehavior" name="EPiServer.Trace.CMS.Services.TraceService">
<endpoint bindingConfiguration="basicHttpBinding" .../>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
Troubleshooting
- Some machines may need registering a MIME type for extension .xap as
application/x-silverlight-app.
IIS7, update web.config.
IIS5–IIS6: Go to IIS
Manager > Server > Properties >
Mime Types > New > Extension
> .XAP MIME
type: application/x-silverlight.
- To run Live Monitor the browser will need Silverlight 3 or higher to be installed to access
the site, see Installing
Microsoft Silverlight.
Do you find this information helpful? Please log in to provide feedback.