Modules / Admin & agency

Admin: search log

Search-term log

See what visitors search for on your site. Kiln counts each term from the site search and from Bricks search filters and live search, and records how many results the term returned.

#14 of 39 modules by votes

  • Off until you switch it on
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3

Tile 14 of 39, ranked by votes · Recording in progress

Where to find it in the builder

Bricks > Kiln, in the Settings disclosure under the module. Nothing is added to the builder or to the front end. The Results column shows a dash when Kiln has no result count for a term.

How to use it

  1. In Bricks > Kiln, under Admin & agency, turn on Admin: search log. Click Save modules. The module is off by default.
  2. Let visitors search. Open Settings under the module to see the table: Search term, Searches, Results and Last searched. It lists the 50 most-searched terms.
  3. Rows in red returned no results. These are terms where you may need content or synonyms.
  4. Change Keep terms for to set how many days a term is kept (1 to 3,650, 90 by default). Click Save modules.
  5. To empty the log, tick Clear the log when I save and click Save modules.

What it counts

  • The site's own search (?s=), including the Bricks Search element, which submits to it.
  • Bricks search filters and live search.
  • One count per term per request. Page 2, "load more" and infinite scroll do not count again.
  • The same visitor running the same search again within 30 minutes counts once. This covers a sort or filter change on a results page. To tell visitors apart, Kiln keeps a one-way hash of the term, IP address and browser for 30 minutes. The log table stores none of those.
  • In live search, "kil", "kiln" and "kiln mug" arrive as separate requests. Kiln ignores prefixes under 3 characters and folds a prefix row created in the last minute into the longer term.

Privacy

  • The log stores the term, the number of searches, the last result count, and the first and last time it was searched. It stores no IP address, user or page.
  • Kiln skips terms that contain @ or seven or more digits. This keeps e-mail addresses, phone numbers and order numbers out. It keeps year ranges such as "2015-2018 civic".
  • Kiln trims terms to 100 characters, lowercases them for matching and skips terms under 2 characters.
  • Kiln ignores crawlers and requests with an empty user agent.
  • A daily task deletes rows not searched within the retention period. The table is capped at 10,000 rows. If it grows past that, the least-searched rows go first.
  • Deleting the plugin from Plugins removes the table and the module's options. Deactivating it keeps them.

Limits

  • Bricks' custom search engines (post fields, meta, taxonomy) set post__in instead of a search term. Kiln does not capture them.
  • The table shows the top 50 terms by number of searches.
  • The Results column is the last count Kiln saw for the term.

Settings

  • Keep terms for (days)
  • Clear the log when I save

Requirements

Bricks 2.4 or newer.