Analytics and Reports

The Analytics page contains data related to searches performed. This page is accessible for both Admin and Business users.

In 9.2 we are running a separate Analytics Server to display the data in Analytics Page. It is required to run the Analytics Server to view the Analytics and reports associated in the Analytics Section.


Starting Analytics as a Process


  1. Go to C:\SearchBloxServer\analytics
  2. Run cubejs.bat as administrator


  1. Go to /opt/searchblox/analytics
  2. Run the command ./cubejs



You may also start the analytics server in the background by running the following command:
nohup ./cubejs &

  1. To stop Analytics process, find the process ID of Analytics server using the following command:
    ss -nutlp | grep 4000
  2. Run the following command to terminate the process:
    kill -9 <process-id>

To run Analytics as a service read: Installing and Running Analytics as Service


Important Information:

  • If you want to access Analytics outside the installed server, please open port 4000. Also please ensure port 4000 is free to run Analytics Server.
  • Please note that the steps are the same if the Analytics Server stops running. Please run cubejs.bat in <SEARCHBLOX INSTALLATION PATH>\analytics folder path as administrator

Analytics Dashboard

The Analytics section of the Admin page provides a report on the searches made so far in Searchblox across all collections. The report is displayed as a dashboard, which can be exported to a CSV or excel file.

View Analytics

In the Analytics Dashboard you can view the following items:

  • Total Queries Count
  • Total Clicks Count
  • Total Autosuggest Click Count
  • Total Zero Queries Click Count
  • Total Queries Graph
  • Total Clicks Graph
  • Top Searches
  • Zero Results
  • Top Clicks
    You can also select the time frame for the reports using the options in the top right corner of the dashboard.
1210 921 929

Download Query Logs Report

Using Analytics you can download query logs for

  • 7 days
  • 30 days
  • 60 days
  • 90 days
    using the option in the top right corner of the dashboard

Configuring Port Number for SearchBlox Analytics

By Default Analytics server runs in port 4000. This port can be changed by making the following changes:

  1. Open the file C:\SearchBloxServer\analytics\.env or /opt/searchblox/analytics/.env

  2. As mentioned earlier by default, the Analytics server will run on port 4000. You can change the port for Analytics if required by adding the below line in the file C:\SearchBloxServer\analytics\.env or /opt/searchblox/analytics/.env

  3. Open the file C:\SearchBloxServer\webapps\searchblox\analytics\index.html or /opt/searchblox/webapps/searchblox/analytics/index.html

  4. Change the port number to custom port as below:
    <input type="hidden" value="8081" id="connection_port">

Configuring SSL for SearchBlox Analytics

When SearchBlox runs on TLS/SSL, we need to place SSL files(cert.pem and key.pem) into C:\SearchBloxServer\analytics to run SearchBlox Analytics.

If you have enabled SSL through DNS then please ensure that SSL is enabled in SearchBlox using the steps provided in Steps to Enable SSL. Only if SSL is enabled in SearchBlox, Analytics will run with SSL.

Follow the steps below to enable secure connection for Analytics:

  1. Stop SearchBlox

  2. Open the file C:\SearchBloxServer\analytics\.env or /opt/searchblox/analytics/.env

  1. Add the following commands to enable SSL for Analytics

  2. By default secure Analytics server will run on SSL port 4433. You can also change the port for Analytics if required by adding the below line.

  1. Please uncomment the following lines in C:\SearchBloxServer\analytics\index.js or /opt/searchblox/analytics/index.js
var tlsOptions = {
   key: fs.readFileSync(__dirname + ‘/key.pem’),
   cert: fs.readFileSync(__dirname + ‘/cert.pem’),
  1. Open the file C:\SearchBloxServer\webapps\searchblox\analytics\index.html or /opt/searchblox/webapps/searchblox/analytics/index.html

  2. Change the value of secured_connection to TRUE and change the port number to default 4433 or give custom port if required:
    <input type="hidden" value="TRUE" id="secured_connection">
    <input type="hidden" value="8444" id="connection_port">

  1. Stop and Start SearchBlox

  2. Stop and Start Analytics

    Running Analytics in Windows
    Running Analytics in Linux


Enable SSL in SearchBlox

If you are directly mapping DNS to IP using DNS Provider, please make sure to enable SSL in SearchBlox for analytics to work. Also please ensure that the secure port is allowed by your DNS Provider.