Skip to content

Commit

Permalink
Rename site-search to site_search
Browse files Browse the repository at this point in the history
To ensure that the event name for when a user searches is in keeping
the GA4 Event Naming Rules which state that underscores should be used
in event names.
  • Loading branch information
patrickpatrickpatrick committed Jun 28, 2024
1 parent fbb65b9 commit c321167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/javascripts/components/search.tracking.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function trackConfirm(searchQuery, searchResults, result) {
.filter((product) => product.name === result.title)

addToDataLayer({
event: 'site-search',
event: 'site_search',
eventDetails: {
category: 'site search',
action: 'click',
Expand Down

0 comments on commit c321167

Please sign in to comment.