Sub topic 11
Granular preferences and separate purposes
This chapter assumes you know what valid consent requires (freely given, specific, informed, unambiguous) and how a basic sign-up form and a consent record work. It covers how to split consent by purpose and let people manage those choices over time. This is general education, not legal advice.
Why one checkbox is not enough
Many sites ask for one consent that covers everything: the newsletter, partner offers, profiling, and SMS. Under GDPR and ePrivacy, consent must be specific. If you bundle several purposes into one tick, the person cannot agree to one thing and refuse another. That weakens the consent, and regulators may treat it as invalid.
A purpose is a distinct reason you use the data. Common marketing purposes include:
- A monthly product newsletter.
- Promotional offers and discounts.
- Event invitations.
- Sharing data with named partners.
- Personalised marketing based on profiling.
Treat each of these as its own purpose with its own wording, its own choice, and its own record.
Designing granular choices
Give each purpose its own unticked checkbox. Do not make agreement to one purpose a condition of getting a service that does not need it.
<form action="/subscribe" method="post">
<label for="email">Email address</label>
<input type="email" id="email" name="email" required>
<fieldset>
<legend>Choose what you want to hear about</legend>
<label>
<input type="checkbox" name="consent_newsletter" value="yes">
Monthly product newsletter
</label>
<label>
<input type="checkbox" name="consent_offers" value="yes">
Special offers and discounts
</label>
<label>
<input type="checkbox" name="consent_events" value="yes">
Invitations to events and webinars
</label>
</fieldset>
<button type="submit">Save my choices</button>
</form>Notice that the person can submit with none of the boxes ticked, so no purpose is forced. If you ask for too many choices at once, people may give up. Two to four clear purposes works better than a long list.
Storing one record per purpose
Your consent records must follow the same split. Store one record for each email address and purpose, so a withdrawal for one purpose does not erase evidence for another.
from dataclasses import dataclass
from datetime import datetime, timezone
from typing import Optional
@dataclass
class Consent:
email: str
purpose: str
text_version: str
granted_at: datetime
withdrawn_at: Optional[datetime] = None
def is_active(self) -> bool:
return self.withdrawn_at is None
def withdraw(consents: list, email: str, purpose: str) -> None:
now = datetime.now(timezone.utc)
for c in consents:
if c.email == email and c.purpose == purpose and c.is_active():
c.withdrawn_at = now
def may_send(consents: list, email: str, purpose: str) -> bool:
return any(
c.email == email and c.purpose == purpose and c.is_active()
for c in consents
)Run may_send before every campaign. A person who withdrew from offers can still receive the newsletter, and the check keeps those two apart.
A preference centre
A preference centre is a page where subscribers review and change their choices. Link to it from every email footer. Good practice includes:
- Show the current state of every purpose, ticked or unticked.
- Let people change one purpose without affecting the others.
- Offer a clear "unsubscribe from everything" option next to the granular ones.
- Apply the change immediately, or within the legal deadline. Do not make people sign in if a link in the email can identify them.
- Write a new consent record each time a choice changes, with the time and the wording shown.
Common mistakes
| Mistake | Why it is a problem |
|---|---|
| One checkbox for newsletter, offers, and partners | Consent is not specific, and the person cannot refuse part of it |
| Pre-ticked purposes in the preference centre | Defaults are not a clear action to opt in |
| Treating a newsletter opt-in as consent for partner sharing | The purpose was never presented, so the person was not informed |
| Overwriting the old record on change | You lose the evidence of what was agreed and when |
| Hiding the "unsubscribe all" option | Withdrawal becomes harder than opting in |
CAN-SPAM does not require opt-in, but offering topic choices still reduces complaints and unsubscribes. CASL requires you to identify each purpose when you ask for express consent, so the same design helps there too.
Exercise
A subscriber ticked "Special offers" in your preference centre but left "Monthly newsletter" unticked. Two weeks later they click a link to withdraw from offers. Which purposes can you email them about afterwards, and what should you store?
Show answer
You may email them about neither. The newsletter was never consented to, and offers were withdrawn. Keep the offers record and set its withdrawn_at timestamp rather than deleting it, so you can show when consent was given and when it ended.
Exercise
Your sign-up form has one unticked box that says "I agree to receive news, offers, and to have my data shared with partners." Name the problem and describe a fix.
Show answer
The box bundles several purposes into one choice, so consent is not specific. Split it into separate unticked boxes for news, offers, and named-partner sharing, and store a separate record for each one that is ticked.