Uninstall (Deactivation) Survey
When someone deactivates your plugin, that’s your chance to ask “why?” The
SDK’s deactivation survey handles this — and the good news is there’s
nothing to wire. bootstrap() sets it up for you.
What’s automatic
After bootstrap(), the SDK automatically:
- Detects when the site owner deactivates your plugin
- Shows the survey (intercepting the deactivation on the Plugins screen)
- Collects and submits the response, together with the name and email of the logged-in WordPress user who answered
You do not register a hook or call a render method for this — it’s one of the fully-automatic features.
It works without usage-data consent
The survey is the one feature a free plugin uses even when the site owner has not opted in to usage data, or clicked Skip, because it only ever runs on their own click (Deactivate, then Submit).
- No consent given: the SDK asks Appneck for your questions using only your product key. Nothing about the site is sent, and no installation is created. A submitted response appears in your Org Panel with the answers, the respondent and the plugin version, but not linked to a site.
- Consent given: the response is linked to that site, as before.
The modal tells the person what is sent: “Submitting sends your answers with your name and email.” A Send anonymously checkbox leaves the name and email out of the request entirely.
The one thing you might need to set
The survey tries to detect your product’s name automatically from your plugin header. If that detection fails (or shows the wrong name), set it explicitly:
$sdk->deactivation_survey()->set_product_name( 'Acme Bookings' );You’d typically call this once, near your other setup code, only if the auto-detected name isn’t right. For most plugins with a normal header, you won’t need it at all.
Configuring the survey questions
The survey’s questions are managed from your Appneck Org Panel (under your Product), not in plugin code. This means you can change what you ask without shipping a plugin update — the SDK submits whatever the current configuration is.
Questions are fetched live, at the moment someone clicks Deactivate — never from a stale, hours-old cache. The modal opens immediately either way (it never waits on the network to appear); the live fetch has a 3-second timeout, and if it doesn’t complete in time — or Appneck is briefly unreachable — the modal falls back instantly to whatever was last successfully fetched on that site. If nothing has ever been fetched at all, deactivation simply proceeds without a survey, rather than trapping the site owner in a broken modal. Practical effect: an edit you make in the Org Panel is visible to the very next person who deactivates, on any site, with no propagation delay to plan around.
A known limitation worth being aware of
The survey works by intercepting the deactivation action on WordPress’s Plugins screen using JavaScript. The SDK’s own documentation flags that this DOM interception has no automated browser-test coverage — if a future WordPress core update significantly changes that screen’s markup, the survey prompt could silently stop appearing. It’s not broken today; just something to re-check whenever you test against a major new WordPress version.
Viewing responses
Responses appear in your Appneck Org Panel under your Product’s analytics — with a breakdown of the most common deactivation reasons. Each response shows who answered (name and a clickable email) so you can follow up; responses sent by older SDK versions show “Respondent not recorded”.
Next: Licensing →