Sub topic 11
Consent and Privacy When Collecting Data
This chapter assumes you can read basic HTML forms and understand how a landing page, a lead form and a thank-you page fit together. It covers what you must tell visitors, what you must ask of them, and how to store what they give you. It is general guidance for lead forms, not legal advice. Rules differ by country and by the type of data, so check with a qualified person before you launch.
Why consent belongs in the funnel
A lead form asks a stranger for personal data. Personal data is any information that identifies a person or can be tied to one, such as an email address, a name, a phone number or an IP address. Once you collect it, you carry duties: say why you want it, use it only for that reason, protect it, and delete it when asked.
Handled well, these duties also help conversion. A visitor who sees a plain promise ("one checklist, plus occasional related emails") trusts the form more. A visitor who suspects a trap leaves, or gives a fake address, and that hurts lead quality.
Key terms
- Consent is a clear, voluntary agreement to a stated use of data.
- Lawful basis is the legal reason you are allowed to process data. Under the EU General Data Protection Regulation (GDPR), consent is one basis. Others include contract and legitimate interest.
- Opt-in means the visitor takes an action to agree. Opt-out means you assume agreement unless they object.
- Double opt-in means the visitor confirms by clicking a link in an email after submitting the form.
- Data minimization means collecting only what you need for the stated purpose.
- Privacy notice (or privacy policy) is the page that explains what you collect, why, how long you keep it, who sees it and how to exercise rights.
What valid consent looks like
Laws such as the GDPR, the UK GDPR, and ePrivacy rules on marketing email set a high bar for consent. Other regimes differ. The CAN-SPAM Act in the United States, for example, mainly regulates how you send and how people unsubscribe. A form that meets the stricter standard is safe to reuse in more places. In the stricter standard, consent must be:
- Freely given. The visitor can say no to marketing and still get what they asked for, where the offer does not depend on it.
- Specific. Each purpose gets its own agreement. "Send the checklist" and "send me weekly promotions" are different purposes.
- Informed. The visitor knows who you are, what you will send and how to withdraw.
- Unambiguous. A visitor must act. Pre-ticked boxes do not count.
- Withdrawable. Leaving must be as easy as joining.
Consent is not always the right basis. If someone requests a free checklist and you only deliver that checklist, you may not need marketing consent to send it. You need consent (or another valid basis) for the extra marketing emails. This is why the form in this tutorial separates the two.
Anatomy of a consent-aware form
Here is the minimal form from the Topic Spine:
<form action="/subscribe" method="post">
<label for="email">Work email</label>
<input type="email" id="email" name="email" autocomplete="email" required>
<label>
<input type="checkbox" name="consent" value="yes" required>
Send me the checklist and occasional related emails. I can unsubscribe at any time.
</label>
<button type="submit">Get the free checklist</button>
</form>Look at what each part does:
- One field. Asking only for an email is data minimization in practice. Every extra field needs a reason.
- A real label. The
labelwithfor="email"tells the visitor, and assistive software, what the field is. - An unticked checkbox. The
consentcheckbox has nocheckedattribute. The visitor must tick it. - Plain wording. The text says what they will get and that they can leave.
- An honest button. "Get the free checklist" names the outcome, which matches what actually happens.
A caution about `required` on the consent box
The required attribute on the checkbox forces agreement before submission. That is acceptable when the checkbox covers the thing the visitor asked for. It becomes a problem when it bundles unrelated marketing into a take-it-or-leave-it deal. A cleaner design for a stricter regime is two separate things: a statement that the email will be used to deliver the checklist, and an optional, unticked box for ongoing marketing.
<form action="/subscribe" method="post">
<label for="email">Work email</label>
<input type="email" id="email" name="email" autocomplete="email" required>
<p>
We will email you the checklist. See our
<a href="/privacy">privacy notice</a> for how we handle your data.
</p>
<label>
<input type="checkbox" name="marketing" value="yes">
Also send me occasional emails about related topics. I can unsubscribe at any time.
</label>
<button type="submit">Get the free checklist</button>
</form>Here, marketing is optional. The server must treat a missing marketing value as "no", not as an error and not as "yes".
Recording consent so you can prove it
Consent you cannot prove is weak. Store a record with each lead:
| Field | Example | Why it matters |
|---|---|---|
| Identifier | lead email or ID | Links the record to the person |
| Choice | `marketing = yes` | What they agreed to |
| Timestamp | 2026-11-26T13:59:00Z | When they agreed |
| Wording shown | Form version 3 text | What they were told |
| Source | `/checklist` page, ad campaign | Where the data came from |
| Method | checkbox, double opt-in | How they agreed |
The wording matters most when you later change the text. Keep a version number for each form so you can show which promise each lead saw.
A server-side sketch makes the idea concrete:
from datetime import datetime, timezone
FORM_VERSION = "checklist-form-v3"
def build_consent_record(email, marketing_checked, source_page):
return {
"email": email,
"marketing_consent": marketing_checked == "yes",
"form_version": FORM_VERSION,
"source_page": source_page,
"recorded_at": datetime.now(timezone.utc).isoformat(),
}
record = build_consent_record("[email protected]", None, "/checklist")
print(record["marketing_consent"]) # False: a missing box means noThe unticked box arrives as None, so the record stores False. That is the safe default.
Double opt-in
With double opt-in, the form submission triggers an email containing a confirmation link. The lead is only added to the marketing list after the click.
Because Mermaid output must be inside the required diagram fence, here is the flow:
Trade-offs:
- Benefit: it proves the address belongs to the person, blocks typos and bot sign-ups, and gives a strong consent record.
- Cost: some real visitors never click, so your list grows more slowly. The people who do confirm are usually more engaged.
If you use double opt-in, deliver the checklist in a way that fits your promise. Some teams send it in the first email; others send it after confirmation. Whichever you pick, say so on the thank-you page.
The privacy notice and where to link it
Link the privacy notice next to the form, at the point of collection. A link buried in the footer is easy to miss. The notice should say, in plain language:
- Who you are and how to contact you.
- What data you collect and why.
- Which other companies receive it (email service, CRM, analytics).
- How long you keep it.
- How to access, correct or delete it, and how to withdraw consent.
Do not copy another company's notice. Yours must describe what your systems actually do.
Handling data after collection
Consent is only the front door. Responsible handling continues behind it.
- Collect less. If you never use a phone number, do not ask for it.
- Limit access. Only the people who need lead data should see it.
- Use secure transport. Serve the page and the form action over HTTPS so data is encrypted in transit.
- Protect secrets. Keep API keys for your email or CRM tool in environment variables, never in page source.
- Honor requests. When a lead asks to be deleted or to unsubscribe, act promptly and record that you did.
- Set a retention period. Delete or anonymize leads who never engage after a defined time.
- Check your vendors. Each tool that receives lead data is a processor of that data. Confirm that each one has suitable terms.
Common mistakes
| Mistake | Why it fails | Fix |
|---|---|---|
| Pre-ticked consent box | Silence is not an action | Leave the box unticked |
| One checkbox for everything | Not specific | Separate delivery from marketing |
| Vague wording, such as "stay in touch" | Not informed | Name the content and the frequency |
| No unsubscribe link in emails | Withdrawal is hard | Add a one-click link to every email |
| Buying lists and adding them | No consent from those people | Collect only from your own forms |
| Treating a missing checkbox as an error | Punishes the visitor for declining | Accept the form, record "no" |
Consent and conversion
Consent text can feel like friction, but the effect is usually small if the wording is short and honest. Two practical points:
- Put the promise next to the button, where the visitor decides.
- Measure on the right base. If you adopt double opt-in, count a lead as confirmed, not merely submitted, and compare like with like before and after the change.
Fewer sign-ups with clear consent are often worth more than more sign-ups with doubtful consent, because unwanted emails lead to spam complaints, which damage your email delivery for everyone on your list.
Exercise
A landing page form has a pre-ticked checkbox reading "Yes, send me weekly offers" and the visitor only asked for a free checklist. Name two problems and describe the fix.
Show answer
The box is pre-ticked, so the visitor did not act to agree, and it bundles marketing with the checklist, so consent is not specific or freely given. The fix is to leave the box unticked and make it optional, with separate text explaining that the email will be used to deliver the checklist. The server should record a missing box as "no marketing consent".
Exercise
Your form is on version 4 and you changed the consent wording from version 3. Why should each lead record include the form version?
Show answer
The version shows exactly what promise each lead saw when they agreed. If you later need to prove consent, or decide whether old leads can receive a new kind of email, the version tells you which wording applies.