Helping you without knowledge of the specific errors can be quite a challenge, but I will do my best to assist.
The problem is likely associated with either the failure of the Drift integration to initialize or an issue related to accessing the cookie. To troubleshoot effectively, it's important to pinpoint the source of the problem.
In terms of Drift, have you double-checked that Drift has been properly initialized?
As per the documentation, a custom Drift attribute should appear in the Custom attributes tab within your contact settings.
You can verify this by executing the provided code snippet in the browser console for the specific website and then confirming the presence of the test
attribute in the Custom attributes tab.
drift.on('ready', function() {drift.api.setUserAttributes({test: 'tester',})})
Keep in mind that Drift doesn't initialize on local websites so ensure you're testing on a server-deployed site.
If the steps above are successful, it indicates that Drift is functioning correctly and the issue may lie in how you're interacting with the cookie, which should be your next focal point.
Regardless, if you could provide details of the error, it would greatly aid in resolving the issue.