Not sure if this is the best solution, but I included the following in my footer:
<script>
function get_var(var_name){
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == var_name){return pair[1];}
}
return(false);
}
var get_variable = get_var("pwb-brand");
if (get_variable !== '') {
document.getElementsByClassName("products clearfix products-1")[0].setAttribute("class", "products clearfix products-3");
}
</script>