This will let you check for the Global Privacy Control (GPC) state and set the USP string accordingly.
if (
navigator.globalPrivacyControl &&
identityObject.geoState === 'CA'
) {
this.uspapi.uspStringSet = true;
this.uspapi.setUSPString(`1YYY`);
} else if (
—