how to set a global variable that is referenced throughout the site?
Ok. With next to no programming I would recommend trying to use the Session Cache API. This module allows for simple items to be stored in say a cookie, even for Anonymous users. You may want to try to use it directly, or use a module that already makes use of it, such as:

Views Global Filter, this module allows you to set an exposed views global filter your visitors fill out once -- and it's remembered for the duration of their visit. As they visit throughout your website your other views pages or blocks would query the existing saved off global filter values in cache and be shown the listings you want.