How to store class variable inside a Craft controller
In addition to passing the value along through a cookie, you could also do it through PHP's session support.

Adding:

craft()-&gt;httpSession-&gt;add('sessionId', '123456');


Retrieving:

$sessionId = craft()-&gt;httpSession-&gt;get('sessionId');


Deleting:

craft()-&gt;httpSession-&gt;remove('sessionId');