Is there a way for a Safari browser extension to detect its own uninstallation?

I would like to send an event to Google Analytics to keep track of the uninstallment rate of my extension.

Edit
Report