Skip to content

Commit

Permalink
Remove 100 character limit on search results
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Sep 17, 2024
1 parent 47ab761 commit 058dbf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Update metatags for GA4 ([PR #4222](https://github.com/alphagov/govuk_publishing_components/pull/4222))
* Set aria-label text in govuk_logo.html to "GOV.UK" ([PR #4217](https://github.com/alphagov/govuk_publishing_components/pull/4217))
* Fix cookie expiration date potentially relying on user's timezone ([PR #4219](https://github.com/alphagov/govuk_publishing_components/pull/4219))
* Remove 100 character limit on search results ([PR #4230](https://github.com/alphagov/govuk_publishing_components/pull/4230))

## 43.1.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
var DEFAULT_LIST_TITLE = 'Smart answer results'

if (isSearchResult) {
// Limiting to 100 characters to avoid noise from extra long search queries and to stop the size of the payload going over 8k limit.
var searchQuery = window.GOVUK.analyticsGa4.core.trackFunctions.standardiseSearchTerm(element.getAttribute('data-ga4-search-query')).substring(0, 100)
var searchQuery = window.GOVUK.analyticsGa4.core.trackFunctions.standardiseSearchTerm(element.getAttribute('data-ga4-search-query'))
var variant = element.getAttribute('data-ga4-ecommerce-variant')
DEFAULT_LIST_TITLE = 'Site search results'
}
Expand Down

0 comments on commit 058dbf8

Please sign in to comment.