mirror of
https://github.com/anotherhadi/default-creds.git
synced 2026-04-02 11:32:11 +02:00
Edit analytics
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -76,7 +76,16 @@
|
||||
totalPages = data.pagination.totalPages;
|
||||
totalResults = data.pagination.totalResults;
|
||||
if (typeof window !== "undefined" && (window as any).umami) {
|
||||
(window as any).umami.track("search", { query: lastQuery, results: totalResults });
|
||||
(window as any).umami.track("search", {
|
||||
query: lastQuery,
|
||||
results: totalResults,
|
||||
hasResults: totalResults > 0,
|
||||
});
|
||||
if (totalResults === 0) {
|
||||
(window as any).umami.track("search_no_results", {
|
||||
query: lastQuery,
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Search error:", e);
|
||||
|
||||
Reference in New Issue
Block a user