If you want to store a %ENV value in SSI Web 7, the best option may be to add a free format question to your questionnaire with a hidden variable. Then you can give the free format HTML like this:
<input name="[% QuestionName() %]_ffvar" id="[% QuestionName() %]_ffvar" type="hidden" value="[% Begin Unverified Perl
return $ENV{'envvar'};
End Unverified %]"/>
"ffvar" must be replaced with the name of the hidden free format variable. "envvar" must be replaced with the name of the environment variable to be stored.
There's no way to do this with JavaScript alone as browsers limit what personal information they expose to websites. The closest option with just JS is the user agent, but that is not a 100% reliable way to measure what device the respondent is using.