What about GDPR?
I installed this extension from albertborsos/yii2-gdpr-cookie-consent
and is just about cookies but I am not sure if need only that.
What I know I about GDPR is that I need to give possibility to the user do:
[*]download user profile
[*]delete user email ( email is use for login )
what you did it for GDPR compliace in your wbsites?
Since this is a general topic across the internet and not specifically related to yii2,
I think a good start is to simply google several summarys of whats needs to be done.
… and after that you can look if there are any yii2 pre-build solutions for your tasks, like the cookie opt-in you mentioned.
Also you could start reading the GDPR itself: