Efficiency reports
With detailed search reports, you can assess how relevant the search results are to your customers. Based on this information, you will be able to fine-tune your search configuration to ensure that your customers are directed to the products they need.
Our extension collects statistical data and stores it in the mst_search_report_log table. Starting from version 2.2.33, this data will be kept for 365 days by default, after which outdated data will be deleted via cron. If necessary, you can manually truncate it. This will only affect the statistics data in the reports.
Each search is recorded together with the store view it was performed on. Both reports provide a Store dimension and quick filter, so you can break the data down by store view or narrow it to a single one. Searches that were logged before this feature was introduced are not attributed to a store view and appear as N/A.
Search volume
You can find the reports in System -> Search management -> Reports -> Search volume.
At the top of the page, there are statistical charts that display the number of searches conducted within a specified period. Using the switches at the top, you can select the date range, data granularity, and chart appearance (chart, diagram, line, or column).
If necessary, you can apply filters, edit columns, and export the data to an XML or CSV file. By default, the following data is available:
- Time: Shows the selected date range (hour, day, week, month, year)
- Search Source: The origin of the search (e.g. main search, autocomplete, category search). Use this dimension to break down query and volume data by where searches were initiated
- Store: The store view on which the search was performed. Available as a dimension and as a quick filter, so you can break the volume down per store view or narrow the report to a specific one
- Searches: Total number of searches performed
- Unique Searches: Number of unique search queries (search phrases)
- Users: Number of unique sessions with searches
- Engagement: The percentage of users who opened a product from the search page
Search terms
You can find the reports in System -> Search management -> Reports -> Search terms. Use it to identify the most popular search queries and their frequency.
If necessary, you can apply filters, edit columns, and export the data to an XML or CSV file. By default, the following data is available:
- Query: Search query
- Search Source: The origin of the search (e.g. main search, autocomplete, category search)
- Store: The store view on which the search was performed. Available as a dimension and as a quick filter, so you can break the queries down per store view or narrow the report to a specific one
- Searches: Number of search requests
- Users: Number of unique sessions with searches
- Engagement: The percentage of users who opened a product from the search page
Slow database backups and the mst_search_report_log table
On stores with many searches, the mst_search_report_log table can grow large. You may see a long-running query like this in the MySQL process list or slow query log:
SELECT /*!40001 SQL_NO_CACHE */ * FROM `mst_search_report_log`
This query is not sent by Magento or by the extension. The /*!40001 SQL_NO_CACHE */ part shows that it comes from mysqldump, which reads the whole table during a database backup.
The table holds only search statistics for the reports on this page. The search itself does not use it. To make backups faster, use one of the following options:
- Exclude the table from the backup: add
--ignore-table=<db_name>.mst_search_report_logto themysqldumpcommand. A restored database will have no search report data, but the search works as usual. - Avoid locking tables during the backup: add
--single-transactionto themysqldumpcommand. The backup still reads the table, but it does not block the store while it runs. - Clear old statistics: truncate the
mst_search_report_logtable, as described in the tip at the top of this page.
If you do not use search reports at all, you can disable only the reports module. The search, autocomplete, and other features keep working:
bin/magento module:disable Mirasvit_SearchReport
bin/magento setup:upgrade
After that, searches are no longer logged to the mst_search_report_log table, and the Search volume and Search terms reports are not available.