By default, the CardioLog Tracking Agent tracks document usage for documents which are accessed through the browser. This is achieved by tracking browser clicks in document libraries (which are not displayed in Explorer view). In order to track document access from non-browser sources - such as Windows Explorer or Microsoft Office, you need to install the CardioLog HttpModule for SharePoint.

Installation Procedure

  1. Contact us to receive the required license for the Document Usage Tracking from within Office module. Apply the license on the CardioLog application server using the License Admin tool found in the CardioLog installation folder: <\CardioLog\CardioLogScheduleServices\Microsoft.Licensing.LicAdmin.exe.
  2. On the CardioLog server, go to IIS > expand the CardioLog website > right click the CardioLogAPI web application > switch to Content View > right click the Events.asmx page > switch to Features View > set the  authentication method to Anonymous access (disable Windows Authentication). 
  3. On the SharePoint WFE server, add the CardioLog Http Module dll to the GAC in one of the following ways:
    1. Drag and drop the dll to the GAC folder located in %windir%\assembly
      Note: Make sure to disable the "User Account Control: run all administrators in Admin Approval Mode" policy on the SharePoint server (for more information click here) in order to be able to drag and drop the dll file to the GAC (to the %windir%\assembly folder)
    2. Install the dll using PowerShell as detailed here


    The CardioLog Http Module dll file can be found in the CardioLog installation folder (select the dll file based on the .NET Framework version installed on your SharePoint WFE server):

    [CardioLog Installation Folder]\CardioLogScheduleServices\CardioLogHttpModuleV45.dll -  for .NET framework version 4.5 or higher
    [CardioLog Installation Folder]\CardioLogScheduleServices\CardioLogHttpModule.dll -  for older .NET framework versions 

  4. On the SharePoint WFE server, for each web site, modify the SharePoint Web.config file:

    To register the module for IIS 6.0 and IIS 7.0 or higher running in Classic Mode:

    CardioLogHttpModule.dll

    <configuration>
      <system.web>
        <httpModules>
          <add name="CardioLogHttpModule" type="CardioLog.HttpModules.EventsModule,CardioLogHttpModule, Version=1.19.154.6, Culture=neutral, PublicKeyToken=56b51e29d93ab3fb" />

    CardioLogHttpModuleV45.dll 

    <configuration>
      <system.web>
        <httpModules>
          <add name="CardioLogHttpModuleV45" type="CardioLogHttpModuleV45.EventsModule,CardioLogHttpModuleV45,  Version=1.19.154.6, Culture=neutral, PublicKeyToken=797c2ad38de530fa" />

    To register the module for IIS 7.0 or higher running in Integrated Mode:

    CardioLogHttpModule.dll

    <configuration>
      <system.webServer>
        <modules>
          <add name="CardioLogHttpModule" type="CardioLog.HttpModules.EventsModule,CardioLogHttpModule, Version=1.19.154.6, Culture=neutral, PublicKeyToken=56b51e29d93ab3fb" />

    CardioLogHttpModuleV45.dll 

    <configuration>
      <system.webServer>
        <modules>
          <add name="CardioLogHttpModuleV45" type="CardioLogHttpModuleV45.EventsModule,CardioLogHttpModuleV45,  Version=1.19.154.6, Culture=neutral, PublicKeyToken=797c2ad38de530fa" />

     

    Add the following keys:

    <configuration>
      <appSettings>
    <add key="CardioLog.Events.DocExtensions" value=".doc*.docx*.ppt*.pptx*.pps*.ppsx*.txt*.pdf*.xlr*.xls*.xlsx*.log*.msg*.odt*.rtf*.csv*"/>
        <add key="CardioLog.Events.ExcludeUserAgents" value="Microsoft Office Existence Discovery*"/>
        <add key="CardioLog.API.EventsServiceUrl" value="http://<CardioLog server>:<port>/CardioLogAPI/Events.asmx"/>
        <add key="CardioLog.Events.LogFile" value="C:\CardioLogHttpModule.log"/>
        <add key="CardioLog.Events.LogLevel" value="Error"/><!--None,Error,Message-->
        <add key="CardioLog.Events.SharePointVersion" value="2013"/>


    Optional keys: 

    <!--  Support claims based authentication  -->
    <add key="CardioLog.Events.SupportClaimsAuth" value="true"/>
    <add key="CardioLog.Events.ClaimsAuthRegex
    " value="^(.*[|])(.*)$"/> <!--  remove the claims based authentication prefix from the user account name by using regex groups -->
    <add key="CardioLog.Events.ClaimsAuthRegexGroupMatch" value="2"/> <!--  specify the group number of the user account name from 'ClaimsAuthRegex' key , starting at `1`-->

    <!--  Ignore the event if a user already accessed the same document in the last 1000 milliseconds -->
    <add key="CardioLog.Events.CacheExpirationTimeoutInMs" value="1000"/>

     

    Edit the values for:
    • CardioLog.Events.SharePointVersion - the SharePoint version (2010/2013/2016/2019)
    • CardioLog.Events.DocExtensions - a list of star separated file extensions you want to track
      Note: Make sure to enter all relevant document types in the "CardioLog.Events.DocExtensions" key (There's no need to add ".aspx", ".asp", ".php", ".htm" as they are included by default). You can use the Document Types CardioLog Report located in the Portal Growth folder of the Report Center navigation pane to see all document types included in your SharePoint environment.
    • CardioLog.Events.LogFile - log file location
    • CardioLog.Events.LogLevel - log messages level. Use "Error" in production environments to log error messages only. Use "Message" in test environments to log all messages for troubleshooting purposes. Use "None" to not log messages at all. 
    • CardioLog.API.EventsServiceUrl -  modify the CardioLog server name and port

  5. Open this file for editing: [Installation directory]\CardioLogAgent\web.config
    set HandleFileExtension to false:
    <add key="HandleFileExtensions" value="false"/>

    [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 should be located on all SharePoint WFEs under the SharePoint website "_layouts" folder (for example - C:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\layouts)

    In versions lower than 3.0.0, edit [Installation directory]\CardioLogAgent\js\AgentEmbed.js
    set element.HandleFileExtensions to false:
    element.HandleFileExtensions = false;
    In versions lower than 2.0.8.0, this element will be located in [Installation directory]\CardioLogAgent\AgentEmbed.aspx

  6. If using NLB for event collection, open this file for editing: [CardioLog Installation Folder]\CardioLogAPI\web.config
    set the Event Collector Url:
    <add key="EventCollectorUrl" value="http[s]://[domain name]/EventCollector/monitor.aspx" />

    [domain name] - the NLB FQDN for the web server that hosts the EventCollector application.

  7. Restart the SharePoint IIS service (iisreset).

 

Note: In you have multiple servers in your SharePoint farm, consider using the HttpModule as a farm scoped SharePoint solution. SharePoint has a dedicated class that deals with Web.config issues and handles rollback and recovery, and ensures that all sites are configured the same way.