<add key="overwriteConnectedUser" value="true" />
Note: By default, the user name will be a unique ID logged in the format "Anonymous_XXXX"
[Installation directory] - by default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the CardioLog Analytics SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs (Web Front Ends) under the SharePoint website "_layouts" folder.
Perform the following steps in order to configure data collection for anonymous users, using the workstation IP address:
<add key="UseIPAddressForAnonymousUserName" value="true" />
CardioLog can identify authenticated users in an anonymous environment by retrieving their user name from SharePoint or using manual configuration.
function normalizeSPUserAccount(userName) {
// return userName;
var splitedTokens = userName.split("|");
return splitedTokens[splitedTokens.length - 1].replace(" ", "");
}
//this function is used to retrieve user account for sharepoint online
function getSPUserAccount() {
var _current_user_name = "Anonymous_" + Math.random() * 100000;
var url = window.location.protocol + "//" + window.location.host;
if (typeof _spPageContextInfo !== "undefined") { //2010,2013,Online
url += _spPageContextInfo.webServerRelativeUrl;
}
else if (L_Menu_BaseUrl) { //2007
url += L_Menu_BaseUrl == "" ? "/" : L_Menu_BaseUrl;
}
url += "/_layouts/userdisp.aspx?Force=True&d=" + new Date().getTime();
var xmlhttp;
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", url, false);
xmlhttp.send(null);
if (xmlhttp.statusText == "OK") {
try {
if (!(typeof __Page === 'undefined'))
var spenv = __Page.agent;
var strToSearch = '<td valign="top" class="ms-formbody" width="350px" id="SPFieldText">'; //2013,online
if (!(typeof spenv === 'undefined')) {
if (spenv.indexOf("2010") != -1)
strToSearch = '<td valign="top" class="ms-formbody" width="450px" id="SPFieldText">';
else if (spenv.indexOf("2007") != -1)
strToSearch = '<TD valign="top" class="ms-formbody" width="450px" ID="SPFieldText">';
}
var pos = xmlhttp.responseText.indexOf(strToSearch);
if (pos >= 0) {
var dispnamePropertiesHtml = xmlhttp.responseText.substring(xmlhttp.responseText.indexOf(strToSearch) + strToSearch.length, xmlhttp.responseText.length);
dispnamePropertiesHtml = dispnamePropertiesHtml.toLowerCase();
dispnamePropertiesHtml = dispnamePropertiesHtml.substring(0, dispnamePropertiesHtml.indexOf('</td>') - 5);
dispnamePropertiesHtml = dispnamePropertiesHtml.substring(dispnamePropertiesHtml.indexOf('-->') + 3, dispnamePropertiesHtml.length);
_current_user_name = normalizeSPUserAccount(dispnamePropertiesHtml.trim());
}
} catch (ex) {
__trace(ex.message);
}
}
if (!_current_user_name || _current_user_name == "") {
_current_user_name = "Anonymous_" + Math.random() * 100000;
}
return _current_user_name;
}
CardioLog can identify authenticated users in an anonymous environment by retrieving the user name manually from a unique element value that is hidden in the client side code.
In order to extend the tracking code to retreive the user ID manually:
<input type="hidden" id="userid" name= "userid" value="DOMAIN\useraccountname">
The CardioLog tracking agent can be easily configured to work with SSL.
Upon activating CardioLog, the Configuration Wizard will be displayed. This wizard will help you configure the Tracking Agent, a tool designed to monitor visitor behavior in SharePoint.
In order to configure the tracking agent to work with SSL, perform the following steps:
Alternatively, do one of the following instead, in order to avoid a possible authentication prompt, or browser security messages when working with SSL:
<add key="CardioLogAgentRoot" value="/_layouts"/>
ca.src='/_layouts/CardioLogAgent/ca.aspx?_random='+Math.random();
tt.src='/_layouts/CardioLogAgent/AgentEmbed.aspx?env=[SharePoint version]&r='+Math.random()*100000;
To configure the timeout settings for the Tracking Agent when the EventCollector web application is not available, edit the following keys in [Installation directory]\CardioLogAgent\Web.config file (time values are in milliseconds):
<!-- Timeout in case the EventCollector web application is not available (the default is 10 seconds).->
<add key="requestTimeOut" value="10000" />
<!-- How long to wait before trying again to access the EventCollector web application (the default is one minute).-->
<add key="serverResponseTimeOut" value="60000" />
[Installation directory] - By default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the CardioLog Analytics SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.
By default, the Java Script tracking code is embedded within a common Java Script file on your SharePoint WFEs according to the relevant software version you have installed:
For MOSS 2007 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\core.js
For SharePoint 2010 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\init.js
For SharePoint 2013 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\init.js
If the CardioLog Analytics SharePoint feature is installed, the Java Script tracking code is embedded within a Java Script file on your SharePoint WFEs according to the version you currently have installed:
For MOSS 2007 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\CardioLogAgent\CardioLogAgent.js
For SharePoint 2010 and SharePoint 2013 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\CardioLogAgent.js
Visits (Sessions) are defined as the activity of one visitor within a single browser session. If a user is inactive on your site for 30 minutes or more, any future activity will be attributed to a new session. Users that leave your site and return within 30 minutes will be counted as part of the original session.
To set the maximum idle time after which the session id is reset, edit the following key in [Installation directory]\CardioLogAgent\js\AgentEmbed.js file (Time value is in minutes):
[Installation directory] - by default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the "CardioLog Analytics" SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.
Time on site is calculated by adding up the time a visitor spends on a page, for every page in a session, including the last page in the session.
To learn more see Capturing Time on Site for Single-Page Visits.
By default, CardioLog Analytics JavaScript tracking code fires "pulse" events every few seconds, until the visitor leaves the page either by navigating away from it or by closing the browser.
These "pulse" events are then processed by the reporting engine to calculate the overall amount of time a visitor spends on a page in a more accurate way, including single-page and last-page visits.
To configure the pulse event time intervals, edit the following keys in [CardioLog Installation directory]\EventCollector\web.config file: (Time values are in milliseconds)
Note: Finding the optimal ping configuration to reduce traffic to the CardioLog server, and still get accurate visit duration reports, depends on a few factors, but primarily the amount of traffic and common user behavior on the portal should be considered.
PingInterval - We recommend a value of 5 seconds as a reasonable "bounce" value, when considering the time it takes to fully load a designated page.
PingIntervalAscendTime - We recommend a value between 5 and 10 seconds.
PingIntervalMax - If the portal is a work tool for your end users, and they usually spend more than a minute on it, you can change this value to 60 seconds.
CardioLog Analytics can calculate time on site by measuring the time between visits to different pages on your site. For example, if a user visits Page A at 4:15 PM. and then Page B at 4:20 PM, the time spent on Page A will be reported as five minutes. A "duration" event will be sent only when the visitor leaves the page and goes to another page, in order to reduce traffic to the CardioLog server.
If a user only visits a single page, it may not be possible to determine the length of time the visitor spent on the site. An action has to occur to trigger the JavaScript tracking code and the most common is a click to navigate to another page.
To measure time on site using duration events, and to disable pulse events, edit the following key in [Installation directory]\CardioLogAgent\js\AgentEmbed.js file:
[Installation directory] - By default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the CardioLog Analytics SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.