How to add additional param to url after successful login

After successfully logging in into a Keycloak realm with openid-connect as protocol, with code as response type, Keycloak will redirect the browser into the redirect uri with param session_state and code (https://{redirect_uri}/?session_state={session_state}&code={code})

How to let Keycloak server add an additional param to the url? is it needed to extend the server?

this question is also asked here single sign on - How to add additional param to url after successful login - Stack Overflow