Skip to content

Catalog searches: record what people look for in the store, on /welcome and from a chat - #895

Merged
keysersoft merged 1 commit into
mainfrom
keysersoft/anythingmcp-connectors-tracking
Oct 6, 2026
Merged

keysersoft merged 1 commit into
mainfrom
keysersoft/anythingmcp-connectors-tracking

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

None of our three catalog searches kept a trace. The store and /welcome filter in the browser, and find_connectors (shared /mcp, used from Claude) logged neither its query nor its result. So we could not see which apps people come for and do not find.

What changes

  • New product events catalog_search and catalog_search_picked, with new metadata keys query, results and missing.
  • Chat (ConnectorSetupService.find): the server records every non-empty query with via: 'mcp', the result count and the returned slugs. It also records missing: the query words no connector mentions anywhere. results alone overstates coverage, because "printify shop" returns the shop connectors while Printify itself is missing.
  • Store and /welcome (useCatalogSearchReport): only a settled query is sent, after typing pauses for 1.5 s, when a result is opened, or when the page is left. Prefixes are never sent. results counts matches across the whole catalog (the category chip is ignored), and opening a result sends catalog_search_picked.
  • A page can only report via: store | welcome; a client-sent via: 'mcp' is dropped.
  • sanitizeSearchQuery: whitespace collapsed, at most 100 characters; a query holding an email address or looking like a pasted key is dropped (the event is kept, without the query).

Reading it

select metadata->>'via' via, lower(metadata->>'query') q, count(*), count(distinct organization_id) orgs
from product_events
where event = 'catalog_search' and created_at > now() - interval '30 days'
  and ((metadata->>'results')::int = 0 or metadata ? 'missing')
group by 1, 2 order by 3 desc limit 50;

Verified

  • Backend: full jest suite green (6723 pass), 4 new tests in product-event.spec.ts, 1 in connector-setup.service.spec.ts. tsc and eslint clean.
  • Frontend: tsc and eslint clean. Not run against a live cloud stack. The hook has the same settle/flush/pick logic as the website one, which was checked in Chrome (one request per settled query, then the pick).

Companion website PR: HelpCode-ai/anythingmcp-website#311.

…me and from a chat

The store and /welcome filter the catalog in the browser and the chat's
find_connectors kept no trace, so searches that found nothing were lost.
Each settled query now becomes a catalog_search product event with the
result count and the surface; picking a result after a search records
catalog_search_picked. From a chat, the server also stores the query words
no connector mentions, since a partial match ("printify shop" -> shop
connectors) still returns results.

Queries are capped at 100 characters and dropped when they hold an email
address or look like a pasted key.
@keysersoft
keysersoft force-pushed the keysersoft/anythingmcp-connectors-tracking branch from 892b0dc to 8e93a82 Compare October 6, 2026 11:26
@keysersoft
keysersoft merged commit 4c3a380 into main Oct 6, 2026
13 checks passed
@keysersoft
keysersoft deleted the keysersoft/anythingmcp-connectors-tracking branch October 6, 2026 11:33
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant