How to pass custom parameters to authorize endpoint?

I have a use case where I need to differentiate users based on the signup form they used to sign up for my application.

My idea was to pass a custom parameter to the signup form which then can be read in auth0 actions and take further actions based on the value of the custom parameter. This would help us to differentiate between users and where they signed up.

I referred to an old community post for the same but this does not seem to be working for me

My current code is like this

loginWithRedirect({
                    authorizationParams: {
                      ui_locales: "en",
                      screen_hint: "signup",
                      redirect_uri: `${window.location.origin}/callback`,
                      custom_param: "randomValue",
                    },
                    appState: { target: "redirectUrl" },
                  })

This did not give me the expected result. I am also open to any suggestion on how to implement this where I can have a signup form that I can use to onboard users from different places and can differentiate between them based on that.