diff --git a/src/components/404.astro b/src/components/404.astro index ebf99b944297856..03c32866752eba3 100644 --- a/src/components/404.astro +++ b/src/components/404.astro @@ -9,6 +9,8 @@ diff --git a/src/plugins/docsearch/index.ts b/src/plugins/docsearch/index.ts index 46ee480fec0945b..eaa1ae7cdb00155 100644 --- a/src/plugins/docsearch/index.ts +++ b/src/plugins/docsearch/index.ts @@ -1,3 +1,4 @@ +import { track } from "~/util/zaraz"; import type { DocSearchClientOptions } from "@astrojs/starlight-docsearch"; export default { @@ -26,6 +27,10 @@ export default { __v: null, key: state.query, props: { + onclick: () => { + track("serp from location", { value: "widget", query: state.query }); + }, + id: "docsearch-search-link", href: `/search/?query=${state.query}`, target: "_blank", children: "View all results",