Product DocsMenu

Deploying the On-Premises Usage Analytics Module

Deprecated The on-premises Usage Analytics module is no longer maintained by Coveo. Rather consider using the Coveo Usage Analytics cloud service to monitor on-premises search usage (see Coveo Cloud Usage Analytics).

The Usage Analytics module components are included when you set up a Coveo .NET Front-End server (see Installing Coveo .NET Front-End) but the Usage Analytics features are turned off by default.

The Usage Analytics module also requires to connect to a Microsoft SQL database where it will log search and navigation actions. You can use an existing Microsoft SQL Server or create a new SQL Server instance. The Coveo .NET Front-End and the Microsoft SQL database can be installed on the same server or on different servers. You can deploy the Usage Analytics module on a single Coveo server configuration or on a multiple Coveo Back-End and Front-End server topology.

In summary, the deployment process consists in creating a dedicated Microsoft SQL database, setting the permissions to the database, and on each Coveo Front-End server, activate and configure the Usage Analytics module to connect to this database.

Usage Analytics module requirements:

  • Microsoft SQL Server 2012, 2008, or 2003 supports the free Microsoft SQL Express Edition (see SQL Server Editions).

    Note: Coveo .NET Front-End 12.0.252+ (June 2013) Support for SQL Server 2012.

  • You need Coveo and Microsoft SQL Server administrator rights to perform the following procedure.

  • Microsoft Silverlight support in the browser used to view the Analytics user interface.

Note: The Coveo new breed of search usage analytics offering is in the cloud. You are encouraged to use the Coveo Cloud Usage Analytics service to monitor on-premises search usage (see Coveo Cloud Usage Analytics).

To deploy the Usage Analytics module

  1. Choose an existing Microsoft SQL Server or install a new instance where the Usage Analytics database will be created.

  2. Note the name of the Microsoft SQL Server instance.

  3. On the Coveo Front-End server, find the name of the user that runs the Coveo site in IIS (see Finding the Name of the User that Runs a Process in IIS).

  4. On the Microsoft SQL Server, create a new empty Usage Analytics database using the default name CoveoAnalytics (see Creating a Database in Microsoft SQL Server).

    Note: You can use a different database name, but you will need to specify this name in the Web.config file later in this procedure. Also, before running the database creation script, you will need to edit the first line of the database creation script to replace the default database name with the name you selected.

  5. Run the appropriate database creation script distributed in the [.Net_Front-End_Path]\Web\Analytics\Scripts\Creation folder (see Running a Script in Microsoft SQL Server).

    Example: With CES 7.0, run the CREATE_CES_ANALYTICS_DB_V7-1.SQL script.

    Important: Use the creation script only the first time that you start using the Usage Analytics module. Running the creation scripts permanently erases any existing Usage Analytics data as it creates blank Usage Analytics database tables.

    If you are installing a new version of CES and deployed the Usage Analytics module for an earlier version, you may need to perform migration tasks for the Usage Analytics database (see Updating the Usage Analytics Database Format).

  6. In Microsoft SQL Server Management Studio, set read and write access rights to the database for the user that runs the CES service:

    1. In the Object Explorer pane, expand the Security folder, right-click on Logins, and then select New Login in the contextual menu.


    2. In the Login - New dialog box, create a login for the user identified in step 3, and then click OK.

      Example: When CES and Microsoft SQL run on the same server and the identified user is NetworkServices, create a NT AUTHORITY\NETWORK SERVICE login.

      Example: When CES and Microsoft SQL run on different servers and the identified user is NetworkServices, create a [CESserverdomain]\[CESservername]$ login, where you replace [CESserverdomain] and [CESservername] by the appropriate names.

    3. Back in the Object Explorer pane, expand Security and Logins, right-click on the newly created login name, and then select Properties in the contextual menu.

    4. In the Login Properties dialog box, select the CoveoAnalytics database as well as the db_datareader and db_datawriter check boxes as shown below.


  7. On the Microsoft SQL Server, in the Sql Server Configuration Manager, ensure that the protocol used by CES to communicate with the SQL database is activated (as shown in the Microsoft SQL 2008 example in the following figure). Restart the SQL server after making changes.

  8. When CES and Microsoft SQL run on different servers, ensure that the firewall of the Microsoft SQL Server allows communication from the Coveo server (typically on port 1433).

  9. On each Coveo Front-End server, edit the Web.config file to activate the Usage Analytics module and configure to which SQL Server it connects:

    Notes:

    1. Using a text editor, open the Coveo Front-End web.config file.

      Example:

      • On a Coveo Front-End server: [.Net_Front-End_Path]\Web\Web.config.

      • In the case of a SharePoint integration, the web.config file is at the root of each SharePoint virtual servers (usually located in C:\inetpub\wwwroot\wss\VirtualDirectories\[PortNumber]).

    2. In the file, after the <coveoEnterpriseSearch> tag, locate the following line:

      <analytics enabled="false" connectionString="Data Source=yourServerName;Initial Catalog=CoveoAnalytics;Integrated Security=SSPI;"/>
    3. Edit the line as follows:

      1. Change enabled="false" to enabled="true" to activate the Usage Analytics data collection.

      2. Replace yourServerName by the name of the Microsoft SQL Server that will host the Usage Analytics database (noted in step 2) to set the database connection string (connectionString=).

        Example: When CES and Microsoft SQL run on the same server, replace yourServerName by localhost or by <yourServerName>\<SQLInstance> for a specific SQL Server instance like MyMachine\SQLExpress or .\SQLExpress.
        When CES and Microsoft SQL run on different servers, replace yourServerName by a string of the form SQLservername.yourcompany.com or by the IP address of the Coveo server.

        Tip: For more information on how to write an SQL connection string, refer to http://www.connectionstrings.com/sql-server-2008.

      3. If you used a database name other than the default name when you created the database, replace CoveoAnalytics by the name you used.

    4. Save the Web.config file.

      The Usage Analytics module immediately starts to collect search usage information to the database and the Analytics user interface tab appears in the default Coveo .NET search interface (for a Coveo administrator only).

    Important: If you have more than one Coveo Front-End server, repeat the editing of the Web.config file on each Front-End server to also collect search usage from these servers.

    Tip: You can customize the Usage Analytics data collection behavior by configuring the Web.config file (see Customizing the Collected Usage Analytics Data).

  10. On the Coveo Front-End server, test the Usage Analytics module:

    1. Using a Coveo administrator account, open the default Coveo search page (Windows taskbar Start > All Programs > Coveo Enterprise Search 7 > Default Search Interface).

    2. Perform a few queries to ensure that some data is sent to the Usage Analytics database.

      If an error message appears, the connection or the permissions to the database may not be set properly (see Troubleshooting and Handling Usage Analytics Module Errors).

    3. In the default .NET search interface, click the Analytics tab to open the user interface.

    4. If Microsoft Silverlight is not yet installed on your server, click the Install Microsoft Silverlight icon that appears to install it.

    5. Verify that the Analytics user interface presents the queries that you performed.

People who viewed this topic also viewed