Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

  • Configuring Data Collection for Anonymous Users
    • Using Unique IDs
    • Using IP Addresses
  • Monitoring Authenticated Users in an Anonymous Environment After They Sign In
    • Retrieving the SharePoint Signed-In User
    • Retrieving the User ID Programmatically
  • Configuring the Tracking Agent with SSL
  • Configuring Timeouts for the Tracking Agent
    • Setting a Timeout for Tracking Usage Data
    • Setting a Timeout for Content Personalization
  • Configuring Session Idle Time
  • Capturing Time on Site for Single-Page Visits
    • Fire "Pulse" Events Intermittently for Continual Recording
    • Measure the Time Between Visits to Different Pages

...

Table of Contents

Anchor
configuring anonymous
configuring anonymous
Configuring Data Collection for Anonymous Users

CardioLog can identify anonymous users

...

across multiple pages and multiple visits on your site using two methods. CardioLog can log their workstation IP address, or

...

create a unique id and

...

store it in a browser cookie on the user's device.

Anchor
cookies
cookies
Using Unique

...

Cookies

...

...

...

Perform the following steps in order to configure data collection for anonymous users, using a unique IDNote:

...

 By default, the user name will be a unique ID logged in the format "Anonymous_XXXX" 
 

...

...

...

  1. Info
    iconfalse

    <add key="SupportAnonymousUsers" value="true" />
    <add key="overwriteConnectedUser" value="true" /> 

  2. In the file system, verify that the [Installation directory]\CardioLogAgent directory security allows access for anonymous users:

...

...

...

...

...

...

...

  1. SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs (Web Front Ends) under the SharePoint website "_layouts" folder.

...

...

...

...

...

  1. Edit the [CardioLog Installation Folder]\EventCollector\web.config file and set the value of the "UseIPAddressForAnonymousUserName" key to "true" like so:

    Info
    iconfalse

    <add key="UseIPAddressForAnonymousUserName" value="true" />

Anchor
monitoring users
monitoring users
Monitoring Authenticated Users in an Anonymous Environment After They Sign In

CardioLog can identify authenticated users in an anonymous environment by retrieving

...

their user name from SharePoint or

...

using manual configuration.

Anchor
retrieving sharepoint
retrieving sharepoint
Retrieving the SharePoint Signed-In User Information

CardioLog can identify authenticated users in an anonymous environment by retrieving the signed in user

...

ID from SharePoint.

...

Perform the following steps in order to

...

configure the tracking code to retrieve the user ID from SharePoint:

...

  1. Follow the steps above for configuring the tracking agent for

...

  1. anonymous users.
  2. Edit the following key

...

  1. in the [Installation directory]\CardioLogAgent\web.config

...

  1. file and set the value of the "UseSPAuth"

...

  1. key to "true"

...

In versions lower than 2.0.8.0:

...

  1. like so:

    Info
    iconfalse

    <add key="

...

  1. UseSPAuth" value="

...

  1. true"/>

    [Installation directory] - By default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the 

...

...

  1. SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.

...

function normalizeSPUserAccount(userName) {
// return userName;
var splitedTokens = userName.split("|");
return splitedTokens[splitedTokens.length - 1].replace("&nbsp;", "");
}

//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;
}

...

...

...

...

...

...

...

  1. anonymous users.
  2. Pass the user's account name through SharePoint's server side code to a hidden element called "userid" in the client side code, like so:

    Info
    iconfalse

    <input type="hidden" id="userid" name= "userid" value="DOMAIN\useraccountname">


    For example, you can retrieve the user name from the _spUserId JavaScript global variable in SharePoint.
    To verify this variable exists in your SharePoint pages, browse to a SharePoint page and enter javascript:alert(_spUserId) in the browser address bar. Verify that you see a popup with a valid

...

  1. ID number.

  2. Edit the following key in the [Installation directory]\CardioLogAgent\web.config file and set the value of the "ForceRegexFirst" key to "true" and the "FixClaimsUserAccountRegex" key to a blank value like so:

    Info
    iconfalse

    <add key="ForceRegexFirst" value="true"/>
    <add key="FixClaimsUserAccountRegex" value=""/>

    [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.

Anchor
configuring ssl
configuring ssl
Configuring the Tracking Agent with SSL

The CardioLog tracking agent can be easily configured to work with SSL, to avoid possible authentication prompts, or browser security messages when working with SSL in SharePoint.

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:

...

 

  1. In Step 2 of the Configuration Wizard,

...

Alternatively, do one of the following instead (in order to avoid possible authentication prompt or browser security messages when working with SSL):

  1. In Step 2 of the Configuration Wizard, install the "CardioLog Analytics" SharePoint feature.
  2. Skip Step 2 of the Configuration Wizard and manually install the Tracking Agent web application on the SharePoint machine (perform the following steps for every WFE):

...

<add key="CardioLogAgentRoot" value="/_layouts"/> 

...

  1. deploy the CardioLog Analytics SharePoint feature.
  2. In case you select to automatically add the JavaScript tracking code to SharePoint common JavaScript files or master pages instead:
    1. Configure SSL for the CardioLog web application.
    2. Edit the following keys in the Java Script tracking code:

      Info
      iconfalse

      cad.src = 'https://[domain name]/CardioLogAgent/getCAData.aspx?r='+Math.random();
      ca.src = 'https://[domain name]/CardioLogAgent/ca.aspx?u='+document.location.href;
      tt.src = 'https://[domain name]/CardioLogAgent/AgentEmbed.aspx?env=[SharePoint version]';

      [domain name] - the Fully Qualified Domain Name (FQDN) for the CardioLog web application.
      [SharePoint version] - the SharePoint version: MOSS2007, SP2010, SP2013, SP2016 or SPOnline.

      The tracking code is located at the end of the file, between these comments: "//Intlock tracking code start" and "//Intlock tracking code end"

      By default, the JavaScript tracking code is embedded within a common

...

    1. JavaScript file on all of your SharePoint WFEs

...

    1. (Web Front Ends), which typically is one of the following locations relevant to your software versions:
      For MOSS 2007 only:
      C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\

...

    1. [language code]\core.js

      For SharePoint 2010 only:
      C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\

...

    1. [language code]\init.js

      For SharePoint 2013 only:
      C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\init.js

...


...

...

...

...

...

>

<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" />

...

...

...

...

SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.

Anchor
setting timeout content
setting timeout content
Setting a Timeout for Content Personalization

Information about

...

visitor segments is downloaded to the client's browser with each page request. The JavaScript

...

code briefly hides the content of the page, adds or modifies page elements, and

...

then re-displays the page according to

...

the relevant visitor segment(s). In order to personalize the page content, the default timeout for loading the visitor segments information is 5 seconds.
To configure the timeout setting in case of a connection error, edit the following key in the JavaScript tracking code (Time value is in milliseconds):

 

Info
iconfalse

var iignoreca = setTimeout(ignoreca, 5000); 

 

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\

...

[language code]\core.js

For SharePoint 2010 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\

...

[language code]\init.js

For SharePoint 2013 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\init.js

For SharePoint 2016 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\LAYOUTS\init.js


If the 

...

...

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

...

/SharePoint 2013/SharePoint 2016 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\CardioLogAgent.js

Anchor
configuring idle
configuring idle
Configuring Session Idle Time

Visits

...

...

...

...

...

Info
iconfalse

<add key="SessionTimer" value="30" />

[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. 

Anchor
capturing time
capturing time
Capturing Time

...

...

...

...

...

...

...

Anchor
fire pulse
fire pulse
Fire Pulse Events Intermittently for Continuous Recording

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)

Info
iconfalse

<!-- The starting interval (default 3 seconds) - the first ping event will be sent after a visitor spends 3 seconds on the page. -->
<add key="PingInterval" value="3000" />

<!--

...

 The time taken from minimum to maximum interval (default 30 seconds) - ping events will be sent every 3 seconds in the first 30 seconds a visitor is on the page. -->
<add key="PingIntervalAscendTime" value="30000" />

<!--

...

 The final interval (default 30 seconds) - ping events after a visitor spends 30 seconds on the page will be sent every 30 seconds. -->
<add key="PingIntervalMax" value="30000" /> 

...

 

Note: Determining the optimal ping configuration to reduce traffic to

...

your 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.

...

Anchor
measure time between
measure time between
Measure Time Between Visits to Different

...

Pages 

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:

...

Info
iconfalse

/**
* @property Ping
* @type {Boolean}
* @default true
*/
_caConfig.Ping = false;

[Installation directory] -

...

By default, the CardioLogAgent folder is located in the CardioLog Installation folder. If the 

...

...

SharePoint feature is installed, the CardioLogAgent folder is located on all SharePoint WFEs under the SharePoint website "_layouts" folder.