-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set date filter GA4 data attrs outside component
- credit to @floehopper - this means more of the GA4 related data attributes for facets are now set in the relevant partial template, which makes the code easier to follow
- Loading branch information
1 parent
a54e77a
commit 4ea037e
Showing
2 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<span data-ga4-change-category="update-filter text"> | ||
<%= | ||
render "components/date_filter", { | ||
<%= render "components/date_filter", { | ||
name: date_facet.name, | ||
key: date_facet.key, | ||
from_value: date_facet.user_supplied_from_date, | ||
to_value: date_facet.user_supplied_to_date, | ||
aria_controls_id: "js-search-results-info", | ||
date_errors_to: date_facet.error_message_to(@search_query), | ||
date_errors_from: date_facet.error_message_from(@search_query) | ||
date_errors_from: date_facet.error_message_from(@search_query), | ||
data_attributes: { "ga4-filter-parent": date_facet.name } | ||
} %> | ||
</span> |