Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Fix filterNames truthy check
JS / TS arrays are truthy even when empty - so check the array length.
As the code was written, we were sending up "" when there were no
filters selected.
  • Loading branch information
sarangj committed Feb 11, 2026
commit 1906215708574f935761112dec7e2a4a93a25de3
2 changes: 1 addition & 1 deletion app/src/utils/ga4Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const trackSearchResults = (
if (searchTerm) {
data["search_term"] = searchTerm;
}
if (filterNames) {
if (filterNames.length > 0) {
data["filter_name"] = filterNames.join("|");
}
dataLayer.push(data);
Expand Down