How to know which "Thank You" page my form responder has landed?

In Youform, you can add  🫶multiple Thank-you pages  and redirect users to the one you desire based on  🧨conditional logic .
But sometimes you might want to know which Thank-you page they landed on.
You can do that using  custom variables .
First let's take an example form where we ask user how many employees they have. If they select 1-50 we take them to the 1st thank you page (which just shows them that we will get in touch with them) but if they select more than 50 we take them to the 2nd thank you page (which asks them to schedule a meeting for e.g).
Here is the logic that we have set:
Now we will set a custom variable Go to your form settings → Hidden and custom variable and add a new custom variable. I am naming it "thank_you_page":
Then I will go back to build tab and open logic editor to add a logic which sets the value to this custom variable as shown below:
Notice how I have added two conditions for value when they select 1 to 50. One is to set the value to this custom variable and other is to take the user to the desired thank you page.
Now, test your form and check your results tab. You will see that the page that the user landed on is visible on the submissions table. This variable data will also be sent to any integration that you have added.