I'm updating my nation's signup page template. When a user clicks the logout link, I would like to redirect them back to the signup page so they can register as a supporter. Currently, they're redirected back to the homepage.
Can I change the page a user is redirected to when they log out? And can I change this value on a per-page basis? At the very least, I'd like to redirect them back to the same page on which they logged out.
Thanks!
Official response from C.J. MinsterCheng
Updated: You can specify what page a person lands on when a he logs out of the site. This can be done using a URL in the form example.com/logout?page_id=### where ### is the page ID, or using the liquid variable {{ request.current_signup.logout_url }} which generates a URL in that format.
Share this post
Showing 15 reactions
Sign in with
Certified Expert
No idea how to make this work while this URL issue continues, please fix ASAP.
No idea how to make this work while this URL issue continues, please fix ASAP.
example.com/logout?page_id=125
(with the page_id you want the user to land on after signing out). Seems to work so far, and it would be great to see this documented…
Film and Campaign Ltd.
Certified Architect
A use case:
Person A creates an supporter account using a shared computer. They forget to log off.
Person B then visits the nation on the shared computer. They would like to sign up as a supporter. They go to the Sign Up page, but cannot sign up because Person A is still logged in. The Sign Up form prompts the visitor to log out if they are not in fact Person A. Person B clicks “log out”.
At this point, a sensible UI flow would log out of Person A’s account and redirect Person B back to the Sign Up page so they can sign up as a supporter. On the other hand, redirecting to the homepage disrupts Person B’s experience — they have to navigate back to the Sign Up page, which some visitors won’t actually do. This loses the opportunity to convert them into a supporter.