How to add a loading timeout during user signup to allow Zapier automation to complete? Answered

Post author
Matthew Rufino

Hi, I'm on process with migrating from V1 to V2, and so far so good. I just want to ask if its possible to add a loading timeout when a user is signing up. I need to add at least 3-5 seconds to make sure my automation in Zapier finishes before redirecting them. Any insight is appreciated. Thanks

Comments

2 comments

  • Comment author
    A J

    Hey Matthew Rufino, usually people have an onboarding form after signup for this purpose, so that by the time user fills up the form, the automation would have published the changes and the user can access their dashboard without any issues at the end.

    In case, that approach does not fit for your project and you want to show a static welcome page after signup which auto-redirects to the login redirect set for the member via automation / any page that you want them to redirect to via custom code, you can paste the following code on the welcome page custom code section:

    <script>
    var Webflow = Webflow || [];
    Webflow.push(function() {  
        function checkLoginRedirect() {
        window.$memberstackDom.getCurrentMember().then(({ data: member }) => {    
          if (member && member.loginRedirect) {        
              window.location.replace(member.loginRedirect);
          } else {        
            setTimeout(checkLoginRedirect, 2000);    
          }  
        });
      }
      setTimeout(checkLoginRedirect, 5000);
    });
    </script>
    

    You can customize the code if you want to redirect to some other page and if its not the login redirect page. This code on the welcome page or any page after signup will redirect to the login redirect page after 5 seconds. Hope this helps

    0
  • Comment author
    Matthew Rufino

    I'll try this, thanks for the response!

    0

Please sign in to leave a comment.