I have two templates. For the purpose of this question lets say the first template is step 1, and the second is step 2. There are links to launch these templates all over the site, but some times an entry is defined and sometimes its not. if the entry is defined, step 1 is skipped. On both steps I have a 'close/cancel' button. I need these buttons to go to whatever url the user was on when they 'launched' this process.
Is there a way of storing a URL as a variable when the 'launch' button is clicked even after moving from step 1 to step 2?
see user journey diagram: