Cannot use a global variable depending on the stream .
But I'm not sure what you need. For my referral and invitation system, I simply register the user as usual, and after the user has been created, get the referral from the session. In almost all situations, it will be the same session.
If there is something in your session that prevents this, I would instead add it to the user creation form.
source share