How to override Memberstack's plan-level redirect with button-specific redirects in Webflow?

Post author
Justin Bull

Hello everyone. In a bit of a bind. Helping takeover an existing decently complex Webflow + Memberstack project. In short:

  1. For a logged in member, who has no plans added;
  2. I am sprinkling in a button/link in various places that add a free plan (data-ms-plan:add="thePlanID")
  3. However, I want the "redirect" or what happens when you click that button/link to be different depending on the context
    - So default-level and plan-level redirects are not good enough
  4. Using data-ms-redirect="current-url" or data-ms-redirect="/foo-bar" on the button/link does not work (plan-level redirect fires on click)
  5. Setting an explicit URL or Page link in Webflow's Link settings on the button/link– which the Memberstack Inspector in Test Mode tells me to do by the way– is ignored and plan-level redirect fires.

Am I missing something here? There are places I want to let a signed in member quick "add a plan" and essentially reload the page without losing context. Redirecting to the plan-level redirect is disruptive to what I'm trying to accomplish 😞

Comments

8 comments

  • Comment author
    Duncan from Memberstack

    It's possible to create a free plan that doesn't have any redirects at all. Could you create a new plan, leave the redirects blank, and use that?

    And then if you do need the redirect you can use your other plan...

    I might be missing something important, so just let me know!

    0
  • Comment author
    Justin Bull

    If I have redirects set on the "Default Settings", but then a plan-specific redirect is blank, doesn't it fallback to the default plan redirects?

    0
  • Comment author
    A J

    Justin Bull, I was testing this out and I believe default redirects work when a user signs up on the site for the first time.

    In case you do not have any plan redirect setup for the free plan and if the free plan buttons are meant for logged in members, you can set the button to point out to say '#' and no specific URL as such.

    When the logged in member clicks on the button, they will just be notified that plan is added successuflly and it should refresh the page. I tested this out with a personal dummy site and it worked on different pages as expected without redirecting as per the default redirects setup on signup.

    Can you test this out and let us know if it works?

    0
  • Comment author
    Justin Bull

    Ah, yes, if I explicitly remove the free plan's specific On Signup in Memberstack, then I get the "Plan Added" toast and the page reloads. Nice. Thank you A J.

    This narrowly solves my problem for now, since our dedicated Sign Up form for the free plan-- for those who are logged out and have no account with us-- seems to redirect elsewhere on purpose and not respect Memberstack's On Signup redirect definition (likely because Webflow is controlling that form). This is desirable by the way.

    0
  • Comment author
    A J

    Yes Justin Bull, if you have setup form level redirect it will override the plan redirects (if any) and glad it worked 🥳

    0
  • Comment author
    Justin Bull

    Tangentially, maybe you can offer some insight on debugging this other issue I'm having: Our custom login page always redirects back to the page the user was on prior visiting the login page on desktop only. Mobile users will get redirected based on what's defined in Memberstack's redirects.

    I kinda always want the "redirect back to previous page" behaviour so it was a bonus it works like this on desktop, without anything I can see in Webflow I don't think. But very perplexed by the desktop vs mobile experience. Any ideas on how I can start to debug this?

    0
  • Comment author
    A J

    Justin Bull, oh that's weird. Is the experience consistent on all mobile devices including Android / iOS or is it specifically tested in one of those?

    If it's in Android, you can share the site link so that I can test it from my end to and help in troubleshooting 🤔

    0
  • Comment author
    Justin Bull

    My iPhone, iOS Mobile Safari and Mobile Firefox. I’ll ask my Android friend to try for himself tomorrow. Anecdotally I noticed it with some collaborators on their devices too but I cannot recall their devices and browser choice.

    0

Please sign in to leave a comment.