Instead of having your analytics toolset read a cookie, pass a unique identifier associated with the user ID. Learn how to do it and keep it privacy compliant.
Bonus, you can now track your users across devices.
For more information read:
Here’s an alternative to cookies for user tracking