PHP SDK

Lifecycle events

With plugin_file set, the SDK sends plugin_activated, plugin_deactivated and plugin_uninstalled itself. Deactivation clears its cron event, and plugin_deactivated carries the survey’s feedback (see Deactivation survey). Sends are non-blocking — an admin clicking Deactivate never waits on a server — and a send the SDK could not start is held locally and delivered, confirmed, on the next scheduled tick.

You can send one yourself; the type must be one of those three or consent_revoked, and anything else is refused locally without a request:

$insights->event('plugin_deactivated');