Yes, you can detect when visitors to your website unsubscribe from push notifications using the Device Info API and Device Presence API (for bulk detection), by checking for the presence of the unsubscribed
parameter returned by both APIs.
Note: Detection only occurs when you attempt to send a push notification to a Web Push subscriber which has unsubscribed from notifications from your website in the browser settings.