When you use the Go to page action, add a key-value pair. It will be added to the URL when navigating to the new page.

Add a When page is loaded event with a Set state of an element action. Then select the custom state of your interest and set its value with a Get data from page URL expression.