Site search
See what visitors type into your site’s own search, and which searches found nothing.
Tell fivebar where your searches are, with a rule or with the tag, and the dashboard lists each term, how many times it was searched, and how often it found nothing.
Setting it up with a rule
If your search pages put the search in their address, add a rule in the site’s settings, under Site search: the
search pages, as a path with * for anything, and the parameter that holds the search. With the pages
/search* and the parameter q:
| Address | Counted |
|---|---|
/search?q=shoes | shoes |
/search/products?q=red+shoes | red shoes |
/search?q=shoes&q=boots | shoes, the first |
/search?Q=shoes | Nothing: Q isn’t q |
Without the *, /search is that page alone, not /search/products.
A site can have up to 10 rules. Each page is tried against them in the order they were added, and the first that
matches and finds a search counts it. A rule starts counting within a few minutes, and can’t count earlier searches.
On a page with data-path, match that path.
Searches the address does not show
If the search isn’t in the address, such as results shown after a form is sent, write it into the tag on the results page:
<script async data-domain="example.com" data-search="{{ query }}" src="https://fiveb.ar/js/tally.js"></script>Leave data-search out on other pages. It counts with or without a rule, and wins where both find a
search, unless it isn’t kept (below), when the rules count instead.
Searches that found nothing
Add data-search-results with how many results the page shows. It goes with a search from a rule or
data-search, and does nothing on its own.
<script async data-domain="example.com" data-search-results="{{ count }}" src="https://fiveb.ar/js/tally.js"></script>| Value | Means |
|---|---|
0 | Found nothing |
120 | Found something |
3,000, -1, 1.5 | Ignored: only a whole number of up to 9 digits is read |
What is kept
| Searched | Kept |
|---|---|
Red Shoes | red shoes |
2026-10-03 | 2026-10-03 |
01234567 | 01234567 |
me@example.com | Nothing: an email address |
+44 (0)20 7946 0958 | Nothing: a number of 9 digits or more |
Terms are kept in lower case with their spaces run together, cut to 100 characters, and are otherwise kept as typed. Only counts are kept: how often each term was searched on each page each day, and never who searched it. See Privacy. With public stats, anyone can read the terms.
On the dashboard
The Site search section shows once the site has a rule or a search. Its Searches pane lists the terms, most searched first, with how often each found nothing. Click its heading for every term, with its searches and No results, the share that found nothing.
Each search counts on the page it was made from. When your searches come from more than one page, each term shows its page, and a term searched from two pages has a row for each:
| Term | Page | Searches |
|---|---|---|
potato | /search/addresses | 12 |
potato | /search/people | 5 |
leeks | /search/people | 3 |
To see one page’s terms alone, click its page in the full view, or filter the dashboard by it. Typing a page into the view’s search box finds its terms too.
- A search counts each time its results are seen, so a reload counts it again.
- It isn’t available filtered by an entry or exit page or by a goal.
- Searches have been counted since 3 October 2026. The stats API and apps read them too, each row with its page.
Single-page apps
Set data-search and data-search-results before moving to the results with
history.pushState. history.replaceState counts no pageview, so a box that rewrites
?q= as the visitor types counts no search. For the back and forward buttons a rule is more reliable,
as it reads the address. See Single-page apps.