Track Site Search
What is Site Search?
In Matomo, Site Search is a special event:
- User performs a search on your site
- You tell Matomo the keyword, category, and result count
Matomo will show this in "Site Search" reports.
Usage
const { trackSiteSearch } = useMatomo();
trackSiteSearch("cats", "Products", 12);
Parameters
trackSiteSearch(keyword: string, category?: string, resultCount?: number)
Example
trackSiteSearch("fancy cats");
trackSiteSearch("fancy cats", "Breeds", 10);