Deleting Onboarding Progress on a GDPR Erasure Request
An erasure request names a person, not a row. Here is how to remove step history without corrupting the completion-rate aggregates beside it.
A GDPR Article 17 request asks you to erase one person's data. Your onboarding checklist stores step completions keyed to that person's account id, and those same rows feed a completion-rate dashboard you look at every week. The request is specific to one user; the dashboard is an aggregate over thousands. Deleting carelessly breaks the aggregate along with the row, and the aggregate is usually the thing someone notices first — a completion rate that drops for no reason, or a cohort chart with a hole in it the week the request was processed.
The mistake is treating the erasure as a single DELETE FROM step_completions WHERE account_id = ? and calling it done. That satisfies the letter of the request but leaves you with two problems. First, if the completion rows are the only record that a cohort existed at a certain size, removing them changes the denominator for every historical report that touches that cohort — last month's 40% completion rate for new signups is not 40% anymore once some of those signups are erased, and nobody re-ran the report to notice. Second, most teams do not store onboarding completions in isolation; they sit next to audit trails, support ticket references, or webhook delivery logs that point at the same account id. A hard delete that only touches one table leaves dangling references in the others.
Separate the identity from the fact
The fix is to decide, before any request arrives, which parts of a step-completion row are personal data and which are a fact about the product. The personal part is the link between a specific person and a specific action: account id 8841 completed step "connect-calendar" at 14:02 on a Tuesday. The product fact is that someone, in some cohort, completed that step — a fact that matters for your funnel chart regardless of which specific person it was.
Practically, this means your erasure routine does not delete the completion row outright. It reassigns or nulls the identifying field while leaving the step id, the completion timestamp (or a coarsened version of it, like the week), and the cohort tag intact:
UPDATE step_completions SET account_id = NULL, anonymized_at = now() WHERE account_id = $1;The row survives for aggregate purposes. The link to the person does not. If your completion-rate query groups by account id for any reason — deduplicating a user who somehow fired the same completion event twice — switch that query to group by a surrogate key generated before anonymization, not the account id itself, so erasure doesn't change dedup behavior for rows that are still live.
What still has to be a hard delete
Anonymization works for the completion fact. It does not work for anything that is, on its own, identifying even without the account id attached — a free-text field where a step asks the user to paste something personal, or a webhook payload you logged verbatim that happened to include an email address in its body. Audit this separately from the completion table: search your onboarding schema and your webhook delivery logs for any column that could hold user-entered text, and hard-delete those rows rather than anonymizing them. A details or payload jsonb column is the usual culprit, because it was added for debugging and nobody revisited what ends up inside it.
Where the request has to land before the database does
The request itself — who asked, when, and that you fulfilled it — needs its own durable record, and that record is explicitly exempt from the same erasure logic: you need to prove the deletion happened even after the deleted person's data is gone. Keep this as a separate table (request id, account id or a hash of it, timestamp, what was anonymized versus hard-deleted) with its own retention rule, distinct from the product tables you're cleaning up. Mixing the proof-of-deletion record with the data being deleted is a common way to accidentally erase the evidence that you complied.
Testing it without a real request
Build this as a script you can run against a staging account before the first real request arrives, not when a deadline is already ticking. Seed a staging account with a full set of step completions, a support ticket reference, and a webhook log entry, run the erasure routine, then check three things: the completion-rate query for that account's original cohort returns the same count it did before, the account id no longer appears anywhere in a text search across the relevant tables, and the proof-of-deletion record exists and is accurate. If any of those three fail, you have found the gap while it costs you nothing.
What to measure instead of guessing
There is no public benchmark for "how many erasure requests a product this size gets" worth quoting, and inventing one would be worse than saying nothing. What you can measure, starting from your own logs, is simpler: track time-to-fulfillment from request received to anonymization complete, and track whether any aggregate report changed by more than the number of rows you touched — if a dashboard moves by more than the erased account's own contribution, something else leaked. Those two numbers are yours from day one and don't require comparing against anyone else.
If you're building this on top of an onboarding checklist that already separates step definitions from completion records, the anonymization query above maps directly onto that schema. See handling PII in onboarding analytics events for the companion problem of keeping the tracking layer clean before a deletion request ever shows up, and try the checklist in preview to see how step records are structured before you design your own erasure routine around them.