Redirect Users to Membership Dashboard
Redirect a Memberstack user to a designated dashboard page based on their package subscription in Webflow. This Javascript snippet will allow you to easily redirect users to their proper dashboard page based on their membership plan on your Webflow…
Redirect a Memberstack user to a designated dashboard page based on their package subscription in Webflow. This Javascript snippet will allow you to easily redirect users to their proper dashboard page based on their membership plan on your Webflow Memberstack site.
How to add it
- Add the Javascript snippet to the head section of your custom code settings
- Update the URLs and the type of Membership name (Basic/Pro)
The code
Javascript
<!-- Add to HEAD section -->
<script>
MemberStack.onReady.then(function(member) {
switch (member.membership.name) {
case 'Basic':
window.location.assign('/members/basic');
break;
case 'Pro':
window.location.assign('/members/pro');
break;
default:
window.location.assign('/members/dashboard');
}
});
</script>