Skip to content

[5.x] Retain UTM fields in listing pages#1246

Open
Jade-GG wants to merge 5 commits intomasterfrom
feature/utm-fields
Open

[5.x] Retain UTM fields in listing pages#1246
Jade-GG wants to merge 5 commits intomasterfrom
feature/utm-fields

Conversation

@Jade-GG
Copy link
Copy Markdown
Collaborator

@Jade-GG Jade-GG commented Apr 1, 2026

ref: HDB-1060

Right now we end up stripping away every param from the route that's not a valid filter. However, we may want to retain the utm fields for tracking reasons.

Right now I've specifically focused on those fields, as it's harder to figure out exactly which fields are not part of the filters set. Also note that this will cause any attributes starting with utm_ to no longer work with the routing.

@indykoning
Copy link
Copy Markdown
Member

Is there any reason we're stripping any url params to begin with? Or a mere side effect from the stateToRoute function?
Wouldn't it be simpler to merge all current url params with the information in stateToRoute?

This way we never remove params not referenced by the uiState

@Jade-GG
Copy link
Copy Markdown
Collaborator Author

Jade-GG commented Apr 3, 2026

Is there any reason we're stripping any url params to begin with? Or a mere side effect from the stateToRoute function?

It is a side effect; We take all parameters that don't match with known strings and put it into the refinementList in routeToState, and then InstantSearch filters out anything from the state that doesn't match an existing filter. This then gets passed back into the stateToRoute.

Comment thread resources/js/components/Listing/Listing.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants