How to send search data to Google Analytics

There are currently two ways of adding Cludo search data to Google Analytics. This article will describe how to directly send Cludo search data to Google Analytics without the use of Google Tag Manager. When needed, the Cludo search data can also be sent to Google Tag Manager and parse on to Google Analytics. See this article for more info.

Enable the Google Analytics integration to automatically send search events to your Google Analytics each time a search is made through your Cludo search engine.

Enable the integration in MyCludo

  1. In the navigation, select Configuration › Data settings.
  2. Enable the Send data to Google Analytics toggle.
  3. Click the Save button.
An engine with the Google Analytics integration enabled.

Set up Google Analytics to receive search data

Search events that are sent to Google Analytics 4 contain some specific parameters or pieces of information regarding the search. In the Google Analytics account, a custom “dimension” must be created for each parameter to track.

How much data to receive

Each Cludo search event contains a handful of parameters that can be saved as a dimension. While the search_term parameter is highly recommended to add, the rest of the dimensions can be considered optional:

  • search_term – the search term entered by the visitor.
  • q_cludoPage – the search results page number that a user is on when the search event is sent
  • q_cludoResultCount – the number of results returned for the search
  • A parameter (or set of parameters) that shows what facets were selected when the search was made. This will vary based on how the search template works. For example, if the template have one “Category” facet, one dimension can be added with the parameter q_cludoCategory.

Example

A search template for a list of banks has a facet to filter results based on the city where the bank is located, as a “City” field. In Google Analytics the event name q_cludoCity can be used to add the selected city/cities.

How to set up a custom definition

  • Log into Google Analytics.
  • In the left side panel, click the Admin menu.
  • In the Data display list, select the Custom definitions option.
  • Create as many custom definitions as needed:
    • Click the Create custom dimensions button.
    • Enter a descriptive name in the Dimension name field.
    • Ensure the Scope drop down is set to “Event”.
    • Optional: Enter a description in the Description field.
    • Enter the Cludo parameter in the Event Parameter field.
    • Click the Save button.
Google Analytics with 5 Cludo related custom definitions.

View search data in Google Analytics

  • Log into Google Analytics.
  • In the left menu, select the Reports option.
  • Under Life Cycle, click Engagment › Events.
  • In the event table, click the view_seach_results event.

A full report on the search event will appear.

The events table with the view_search_results event listed.