Redirecting to new page after sign up

Question:
Hi there! I would like my members to click the sign up button, and then after signing up, be redirected to a chosen page. I know that this question has been asked before—and I have actually looked at all these past threads!—but a) I don’t think I’ve found a definitive solution, or b) I don’t understand it, because the complete code to copy and paste is not given.

Product:
Wix Editor

What are you trying to achieve:
Again, I would like to have the member redirected to a certain page after they sign up. The reason I would like to do this, is because after signing up, I would like to take them to a page where they can choose from some “starter” avatars.

Again, I have already looked at the old threads, but I don’t understand them, if they do in fact provide a viable solution. They don’t appear to have anything for me to copy and paste, and unfortunately I’m not a good enough coder with Velo to figure it out myself. :slight_smile:

Thank you very much! I appreciate your help.

When do you want the redirection to occur? Only after registration, or every log in?

Generally, you can use wixMembersFrontend.authentication.onLogin to handle login events
You can use wixLocationFrontend.to to redirect the window

Only after registration. They would sign up, and be redirected to a page where they choose their avatar, and then possibly subsequent pages after that. Or, I could have it redirect them to their member page. In any event, the automatic redirection after login is what matters.

Again, if you could provide the code, that would be wonderful. I looked at those two links and they seem theoretically to make sense but I have no idea how to actually do it, lol.

Thanks :slight_smile:

Can’t really write the code for you, especially without fully understanding your needs

Generally, the code would look something like this:

import wixMembers from 'wix-members-frontend'

wixMembers.authentication.onLogin(() => {
    // This code runs when the site visitor logs in
})

The logic within the triggered function is up to you to decide.


For first-login only, I’d maybe create a CMS collection holding memberId and a boolean indicating first login.
When logging in, the code will check that collection to see if the boolean is false, and if so, redirect the visitor and set the boolean to true (or perhaps after a process they need to perform)

What do I put inside the brackets of what you posted above?

import wixMembers from ‘wix-members-frontend’

wixMembers.authentication.onLogin(() => {
// This code runs when the site visitor logs in
})

I guess this means that after they click sign up (and are logged in as a result,) Wix will recognize them as a member. But I don’t understand how you use the wixLocationFrontend.to you talked about above to build the code.

Again, all I want to do is that after they register on the sign up form, they are redirected to. a page of my choice.

Thank you :frowning_face: I’m sorry for not understanding

You should head over to Velo documentation and read on the functions I listed, how they work and what they do

The onLogin event fires whenever a member logs in, that can happen both after registration and after normal login of an existing member.
Therefore, you can leverage the CMS to check if a member has already logged in in the past or not.

Read on:

  • wixLocationFrontend.to
  • wixMembersFrontend.authentication.onLogin
  • wixData.query and wixData.insert

Hey @austinmdiamond

If you’re experiencing issues with “Redirecting to new page after sign-up” on your Wix website, here’s a general approach to resolve it:

Steps to Fix the Issue:

Check Your Wix Sign-Up Settings:

  • Go to your Wix Dashboard and check your Sign-Up Form Settings. There may be a setting that defines where users are redirected after they sign up. Ensure that the page URL is correct.

Review Your Automation Settings:

  • If you are using Wix’s Automations feature to trigger actions after someone signs up, ensure that the automation is correctly set up. You might have an automation set to redirect users to a specific page that is causing the issue.

Check Your Member’s Area Settings:

  • If you’re using a Member’s Area, check the redirect settings there as well. Sometimes, Wix automatically redirects users to their dashboard or a specific page after they sign up. You can change the behavior under your Member’s Area Settings.

That seems a lot simpler than coding it, but I can’t seem to find such options - Where in the settings do you control the signup reidrection?

Navigate to your Wix Dashboard and find the Automation tab on the left-hand side. Once you open the Automation page, click on New Automation. Refer to the screenshot for guidance, or proceed to set up the automation or configure a redirect.

Wix Automations seem only to do backend stuff
There is no option to redirect a user once they sign up

Hi,

In this case, you could try to launch a function on all event of connection.
In this fonction you test a data “NotFirsConection” attached to the member. If true you know your welcome page has been filled previously and at the contrary you could transfer the member on your welcome page. And don’t forget to set your “NotFirsConection” data as true when the member filled your form.

Best regards,