Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Search History Tracker

1 sites No security coverage Drupal 9โ€“11
View on drupal.org

This module enhances user experience by automatically tracking recent search terms in the user's browser, not on the server. It displays these terms as clickable links, allowing users to easily re-search without compromising privacy or adding server load.

Search Tracker is a privacy-focused module that automatically captures and displays users' recent search terms using browser localStorage. Unlike traditional search modules that store data server-side, this module keeps all search history locally in each user's browser, ensuring complete privacy and reducing server load.

Perfect for sites with search functionality that want to improve user experience without compromising privacy or requiring database storage for search terms.

Features

  • Automatic Term Capture: Automatically detects and stores search terms from configurable URL parameters
  • Privacy-First Approach: All data stored client-side in localStorage - no server-side storage
  • Configurable Parameters: Set which URL parameter to monitor (default: 'search')
  • Path-Based Activation: Choose specific pages where search tracking should activate (supports wildcards)
  • Flexible Display Block: Shows recent searches as clickable links for easy re-searching
  • User Control: Built-in "Clear History" functionality for users
  • Duplicate Prevention: Intelligently handles duplicate consecutive searches
  • Lightweight: Minimal impact on site performance
  • Mobile-Friendly: Works seamlessly across all devices

Use Cases:

  • E-commerce sites wanting to show customers their recent product searches
  • Content sites helping users quickly revisit previous search queries
  • Any site with search functionality that wants to improve user experience
  • Organizations requiring strict privacy compliance (no server-side search logging)

Post-Installation

  1. Enable the module: drush en search_tracker
  2. Configure permissions: Go to /admin/people/permissions and assign "Administer Search Tracker settings" to appropriate roles
  3. Configure settings: Navigate to /admin/config/search/search-tracker to:
    • Set the URL parameter name your search uses (e.g., 'search', 'q', 'keywords')
    • Configure maximum number of terms to store (default: 10)
    • Define which paths should activate tracking (e.g., '/search', '/search/*')
    • Customize the localStorage key if needed
  4. Place the block: Go to /admin/structure/block and place the "Search Tracker" block in your desired region
  5. Test: Perform searches on your configured paths and verify the history appears in your block

No additional configuration required! The module works automatically once configured. Users will see their search history populate as they search your site.

Additional Requirements

  • Drupal Core: Requires Drupal 9, 10, or 11
  • Browser Support: Modern browsers with localStorage support (Chrome 4+, Firefox 3.5+, Safari 4+, IE 8+)
  • JavaScript: Requires JavaScript to be enabled in users' browsers
  • No external dependencies: Works entirely with Drupal core - no additional modules or libraries required

While Search Tracker works independently, it pairs well with:

  • Search API: For advanced search functionality (configure parameter as 'search_api_fulltext')
  • Apache Solr Search: For enterprise search capabilities
  • Views: To create custom search result pages
  • Autocomplete Deluxe: For enhanced search input fields

Similar projects

How Search Tracker differs from alternatives:

  • vs. Search Log modules: We store data client-side for privacy, not server-side
  • vs. Database-driven history: No database bloat or privacy concerns
  • vs. Cookie-based solutions: localStorage provides more storage space and better performance
  • vs. Session-based tracking: History persists across browser sessions

Search Tracker is unique in its privacy-first approach and zero server-side footprint.

Supporting this Module

This module is developed and maintained as a contribution to the Drupal community. You can support its development by:

  • โญ Starring the project if you find it useful
  • ๐Ÿ› Reporting bugs and suggesting improvements in the issue queue
  • ๐Ÿ”ง Contributing code improvements and patches
  • ๐Ÿ“– Improving documentation and translations
  • ๐Ÿ’ฌ Helping other users in the support forums

Community Documentation

  • GitHub Repository: [Link when available] - Full source code and development
  • Demo Site: [Consider setting up a DrupalPod demo]
  • Issue Queue: Report bugs, request features, or get support
  • Module Documentation: Comprehensive README included with installation

Technical Implementation

For developers interested in the technical details:

  • Storage Method: HTML5 localStorage API
  • Data Format: JSON array of search terms
  • Performance: Lazy loading - JavaScript only loads on configured paths
  • Privacy: Zero server-side data collection or storage
  • Extensibility: Clean, documented code ready for customization

Perfect for sites that value user privacy, performance, and user experience enhancement!

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Oct 2025
Latest release
8 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable 9โ€“11 Dec 22, 2025
1.0.0 Stable 9โ€“11 Dec 19, 2025
1.0.x-dev Dev 9โ€“11 Oct 13, 2025