If you are experiencing issues with the installation of SearchBox, please make sure you have read the setup guide in full. If SearchBox is still informing you that data is not being collected, you can determine the problem manually by following our debugging capability. If this process — or if the installation itself — is too technical, please contact your account manager for assistance.

Scroll to the end of the article for further troubleshooting in cases where data is being collected.


Video Walkthrough


Setting up the debugger is as easy as setting the debug flag to true in the JavaScript used to define the Solosegment object on your search page. Simply add the following line to the beginning of your JavaScript related to Solosegment:

Solosegment.data._debug = true;

Note, by default, the _debug flag is set to false.

This turns on console messages to be viewed in your browser’s console.

About the Debugger

Console messages consist of the original API request and the response from the server in the format:

Solosegment [Search|Results|Click] Request URL:


Solosegment [Search|Results|Click] Response: { … }

The request is in the form of a string that is the URL containing the request, while the Response is displayed in the form of an object. Both the request and response are stored in the Solosegment object for your convenience and may be inspected in your browser’s console:


The debug_data object is comprised of the messages sent, each respective response, and the last clicked link that is tracked by the Solosegment object

Sent messages are displayed in the console via warning messages, but may be reviewed via the debug_data object as well. If multiple messages are sent, all will be stored here.

Responses contain the log object and the original API request (for easier matching between a request and its response). Here is where you will be informed on any errors that occurred with regards to the request sent, specifically in the ‘non_fatal_errors’ attribute. If the non_fatal_errors attribute is null, then no fatal errors occurred with regards to the request that was sent.

Below is a screenshot of an example of a non_fatal_error returning with an error indicating facets were not set or collected properly:

Further details on the completion of the request can be found in the ‘log’ object:

All information within the log object may be audited and reconciled, such as the search_url, the search term, etc. One thing to note is that not every message sends all the same information. For example, the screenshot shown above is that of a ‘search’ message response, thus the url_results will be null as the urls for the results are not sent in this message.

Below is an example of a ‘results’ message that would contain the array of urls from the results of the search:

So far, the above text shows how you may verify the correct data is being logged based off what is shown on your results page for that given session. To test clicks, simply click a link to view the request sent to the Solosegment servers. The click will not follow through to the attached URL:

Clicks should be thoroughly tested by clicking on all portions of the individual result that SHOULD send the user to the URL attached. For example, if a result has images, headline followed by text, or should be entirely clickable, you will want to test and make sure that the click request is sent to the Solosegment server if the click should send the user to the URL attached. The last clicked link will be stored in the Solosegment.debug_data object in the lastClicked attribute.

To follow through with a click, open the developer console on your browser and call the following function:


This function will go to the URL of the last clicked results link. You may find the URL this function will go to by inspecting the Solosegment.debug_data.lastClicked object.

Turning Off the Debugger

Finally, to turn off the debugger, simply set the Solosegment.data._debug flag to false or comment/remove the line from your JavaScript. Console messages and the click functionality will return to default behavior.

Auditing Your Collector

When debugging your collector JavaScript, you may audit the values being stored on the Solosegment server with the actual values on your site’s search page. The ‘log’ object in the Solosegment.debug_data object should be used as a guide to auditing the values sent to Solosegment (attributes marked with a * indicate values that should be reconciled when testing changes to the collector JavaScript):

    • *Action: The action attribute indicates the type of request that was sent: search, results, click, adclick. In each request, with the exception of the search request, the list of result URLs are attached. Search pages resulting in many results or unusually long URLs may cause the collector to split the request into multiple messages. These messages will be given the following actions: results_overflow, click_overflow, and adclick_overflow.
        • Search: Upon initialization of the collector JavaScript, an initial search request is sent to Solosegment containing information about the search term, API account, fingerprint, timestamps, facets, and originating search URL.
        • Results: The results request contains the same information as a search, but also includes a dictionary of all tracked results URLs and the order provided to the collector (be it by another JavaScript object or parsing the DOM).
      • Click: Click messages contain the same information as the results request with the addition of which URL was clicked.
    • Browser_time: Timestamp taken from the user’s browser.
    • *Click_url: If the message has a click action, then the click_url field will contain the URL of the tracked search result that was clicked.
    • *Click_url_index: Index or position of tracked search result on search page that was clicked.
    • Debug: Flag used to indicate whether or not the collector is in debug mode.
    • *Domain: Domain of the originating search.
    • *Facets: JSON object used to indicate the search facets selected on the search page.
    • Fingerprint: Automatically generated at the beginning of a browser’s session and stored in the browser’s cookies.
    • Http_headers_json: HTTP headers from request messages.
    • *Js_version: Indicates which collector JavaScript version is running
    • *Page: The current page of paginated search results.
    • *Results_per_page: Current selected results per page on paginated search results.
    • *Search_url: URL of the current search page.
    • Session: Similar to fingerprint; automatically generated used to define Solosegment’s sessions.
    • *Term: The search term used in the search.
  • Time: Solosegment server timestamp upon receipt.

Further Troubleshooting

Data is being collected intermittently or inaccurately.

1. SoloSegment has a certain methodology for data collection and calculation. If you are using another analytics software to capture your website search data, you may notice discrepancies between volume or other metrics. Please read about our methodology in the “How Do I Use SearchBox?” article for a detailed explanation.

2. Check your load balancers or caches. Data that is being collected for some users but not others may be due to a server syncing issue.

3. You are implementing our JavaScript inside third-party technologies, such as Google Tag Manager. While we recommend that users of SearchBox install our JavaScript directly onto their search results page, many website owners may opt to install through pre-existing technology. Because some browser adblockers may block certain tracking managers — such as Google Analytics or Google Tag Manager — you should be aware that the blocking of the technology will also prevent the loading of our JavaScript and subsequent data collection.