Web Messaging SDK: Setting guest attributes for authenticated users

We’re trying to push custom attributes from our login session into the Genesys Cloud Web Messaging widget. The docs mention the guest object, but I’m not sure how to call it before the widget loads. I tried setting window.genesysCloudWebChatSettings.guest.name directly, but it doesn’t stick. Is there a specific SDK method to inject this data? I’ve got the client ID configured. Any help would be great.