PHPackages                             amadeco/module-popular-search-terms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. amadeco/module-popular-search-terms

ActiveMagento2-module[Search &amp; Filtering](/categories/search)

amadeco/module-popular-search-terms
===================================

Magento 2 module to display popular search terms based on frequency or recency.

v1.2.0(3mo ago)1131OSL-3.0PHP

Since Mar 24Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Amadeco/magento2-popular-search-terms)[ Packagist](https://packagist.org/packages/amadeco/module-popular-search-terms)[ RSS](/packages/amadeco-module-popular-search-terms/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

Magento 2 Search Terms Module
=============================

[](#magento-2-search-terms-module)

[![Latest Stable Version](https://camo.githubusercontent.com/b5d07f160b39536a6ef02d149fc0c0a7c21a38b3b1c7e65c3039c45e61d95199/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f416d616465636f2f6d6167656e746f322d706f70756c61722d7365617263682d7465726d73)](https://github.com/Amadeco/magento2-popular-search-terms/releases)[![License](https://camo.githubusercontent.com/c14c71a79ace5e28f8d914ff271dcb67a40744c3fa8cd89497557c16fa20a5d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f416d616465636f2f6d6167656e746f322d706f70756c61722d7365617263682d7465726d73)](https://github.com/Amadeco/magento2-popular-search-terms/blob/main/LICENSE)[![Magento](https://camo.githubusercontent.com/7ca3909c73f8748e38748627518617c1217a86ccbc1387f75dc61eaf8f405680/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e782d627269676874677265656e2e737667)](https://magento.com)[![PHP](https://camo.githubusercontent.com/83d697baa78e4225d630587096ed1b0d8a0ece94e9b2ebab599fc9bb986477ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d626c75652e737667)](https://www.php.net)

[SPONSOR: Amadeco](https://www.amadeco.fr)

A Magento 2 module that enhances the search experience by displaying popular search terms and personal search history. Optimizes product discovery and conversion rates by suggesting relevant terms based on both collective and individual user behaviors, all configurable from the admin and with no performance impact thanks to intelligent caching and hybrid loading.

Features
--------

[](#features)

This professional module for Magento 2 enhances the search experience by combining two powerful features:

- **Popular Search Terms**: Display the most popular search terms on your store, sorted by frequency or search date.
- **Recent Searches**: Save and display each visitor's personal search history.
- **Hybrid Loading Modes**: Choose between **Direct Injection** (best for SEO and Core Web Vitals) or **AJAX Loading** (best for Full Page Cache/Varnish environments).
- **Smart Block Caching**: Native Magento caching mechanism with configurable TTL to ensure zero database impact on frontend rendering.
- **Native LocalStorage**: Uses namespaced browser storage for instant history retrieval without dependency on Magento's `customer-data` JS sections.
- **Easy Configuration**: Fully configurable through the admin panel.
- **Customizable**: Extensive layout customization options via XML.
- **Internationalization**: Complete translations available (en\_US, fr\_FR).

Screenshots
-----------

[](#screenshots)

[![screenshot](https://private-user-images.githubusercontent.com/2975845/426196838-9ed66fe2-b511-4c0e-8394-9cb9718fa182.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE1NDQyNTcsIm5iZiI6MTc4MTU0Mzk1NywicGF0aCI6Ii8yOTc1ODQ1LzQyNjE5NjgzOC05ZWQ2NmZlMi1iNTExLTRjMGUtODM5NC05Y2I5NzE4ZmExODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9y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40a8rVhXTWvD8iq0)

Requirements
------------

[](#requirements)

- Magento 2.4.x
- PHP 8.3+

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require amadeco/module-popular-search-terms
bin/magento module:enable Amadeco_PopularSearchTerms
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
```

### Manual Installation

[](#manual-installation)

1. Download the code and extract to `app/code/Amadeco/PopularSearchTerms/`
2. Run the following commands:

```
bin/magento module:enable Amadeco_PopularSearchTerms
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

1. Go to **Stores &gt; Configuration &gt; Catalog &gt; Popular Search Terms**
2. Configure the options:

- **Enable Module**: Activate or deactivate the widget.
- **Data Loading Method**:
- *Direct*: Injects terms directly into HTML (better for SEO/LCP).
- *AJAX*: Fetches terms asynchronously (better for Varnish/FPC).
- **Number of Terms**: Number of search terms to display (Range: 1-50).
- **Max Recent Searches**: Maximum number of recent searches to save in browser history (Range: 1-10).
- **Sort Order**: Sort by popularity or recency.
- **Time Period (days)**: Number of days to look back for search terms.
- **Cache Lifetime (seconds)**: Time to cache the search terms data (e.g., 3600 for 1 hour).

Customization
-------------

[](#customization)

### XML Layout

[](#xml-layout)

The module is now deeply integrated with Magento's `jsLayout` system. You can override any configuration parameter directly in your layout XML:

```

                        Amadeco_PopularSearchTerms/js/search-terms

                            Amadeco_PopularSearchTerms/search-terms-template
                            5
                            10
                            search_mini_form
                            q
                            recent-searches

```

### Configuration Parameters

[](#configuration-parameters)

These parameters are available within the `config` node of the `search-terms` component:

- **max\_recent\_searches**: Maximum number of recent searches to display and save (default: 5).
- **number\_of\_terms**: Overrides the system configuration for the number of popular terms to fetch (Direct mode only).
- **search\_form\_id**: The HTML ID of the search form to monitor for building the history (default: "search\_mini\_form").
- **search\_input\_name**: The `name` attribute of the search input field (default: "q").
- **storage\_key**: The key used in LocalStorage, prefixed by `amadeco:` (default: "recent-searches").

### Styling

[](#styling)

The module includes LESS styles that can be overridden in your theme. The main styles are defined in: `view/frontend/web/css/source/_module.less`.

How it Works
------------

[](#how-it-works)

1. **Popular Terms**: Uses Magento's built-in search query collection. Depending on the loading method, terms are either rendered server-side with block caching or fetched via a secure AJAX controller.
2. **Recent Searches**: Utilizes browser **LocalStorage** with a specific namespace (`amadeco:`) to persist and retrieve user history instantly.
3. **Performance**: Implements **Block Caching** with automatic cache key generation based on store ID, loading method, and sort parameters to ensure high performance.

License
-------

[](#license)

This module is licensed under the Open Software License ("OSL") v3.0. See the [LICENSE.txt](https://www.google.com/search?q=LICENSE.txt) file for details.

Support
-------

[](#support)

If you encounter any issues or have questions, please [open an issue](https://github.com/Amadeco/magento2-popular-search-terms/issues) on GitHub.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance80

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Total

5

Last Release

106d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b211427be009c505885db00496fe829753399414856083648cec5c7af5003fcd?d=identicon)[IlanAmadeco](/maintainers/IlanAmadeco)

---

Top Contributors

[![Amadeco](https://avatars.githubusercontent.com/u/2975845?v=4)](https://github.com/Amadeco "Amadeco (72 commits)")

---

Tags

extensionmagentomagento2-extensionmagento2-extension-freemagento2-modulemagento2-module-freemodulesearchuisearchmagentomagento2ux

### Embed Badge

![Health badge](/badges/amadeco-module-popular-search-terms/health.svg)

```
[![Health](https://phpackages.com/badges/amadeco-module-popular-search-terms/health.svg)](https://phpackages.com/packages/amadeco-module-popular-search-terms)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M49](/packages/smile-elasticsuite)[smile/module-elasticsuite-cms-search

Smile Elasticsuite - Cms Pages Search Module for Smile Elasticsuite.

25966.8k1](/packages/smile-module-elasticsuite-cms-search)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[smile/module-elasticsuite-rating

Smile ElasticSuite - Rating search module.

1498.6k3](/packages/smile-module-elasticsuite-rating)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

1310.9k2](/packages/opengento-module-category-import-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
