dub icon indicating copy to clipboard operation
dub copied to clipboard

Link Get parameters are sorted in a different order

Open max-samusevich opened this issue 1 year ago • 3 comments

Hello!

I use an online cloud version of Dub. I added some parameters to a link, both UTM and other custom parameters but I noticed that the order of parameters is changed. For instance, I wanted to place UTM parameters in a canonical order: source, medium, content, term. Then I want to place custom parameters. But when I create a link and click it, I see such order ?size=6&utm_content=3&utm_term=4&utm_medium=2&utm_source=1&model=5 (numbers mean the desired initial order of attributes).

The proper order is crucial for some analytical services plus it's more convenient for me to operate links in order I've set.

Why is it happening and is it possible to save the attributes order?

UPD Firstly I supposed the order of properties became alphabetical, but then realized there's possibly another rule that sorts properties. Anyway, this order is different than initial one

max-samusevich avatar Oct 23 '23 12:10 max-samusevich

I've noticed that in a link card, in a list of all links, the shortened link has parameters in the wrong order, but the long link below the shortened one has the correct order of parameters.

max-samusevich avatar Oct 23 '23 14:10 max-samusevich

@steven-tey, is it possible to keep URL parameters as is without sorting?

max-samusevich avatar Oct 26 '23 11:10 max-samusevich

@max-samusevich sorry for the late response here – to clarify, does this only happen when you pass URL Parameters to Destination URL?

steven-tey avatar Nov 09 '23 01:11 steven-tey