Sub topic 12
Privacy and Consent When You Collect Data
This chapter assumes you know how analytics tags, UTM parameters and lead forms work, as covered in earlier chapters. It explains what rules apply when your hub collects data from visitors, and how to build the site so it follows them.
Why the hub carries the risk
Your website is where visitor data is collected. Analytics scripts record behavior. Forms collect names and email addresses. Ad pixels share visits with advertising platforms. Each of these is a data flow that privacy law can regulate.
Laws differ by region. The EU and UK GDPR, the ePrivacy rules on cookies, and California's CCPA/CPRA are the best-known examples. This chapter gives a working model, not legal advice. Check your own obligations with a qualified person.
Key terms
- Personal data is any information that can identify a person, directly or in combination with other data. Email addresses, IP addresses and cookie IDs usually count.
- Consent is a clear, informed, freely given choice to allow a specific use of data.
- Lawful basis is the legal reason under GDPR for processing data. Consent is one basis. Others include contract and legitimate interest.
- Cookie is a small file a site stores in the browser. Some cookies are essential, such as a shopping cart. Others track behavior for analytics or advertising.
What needs consent
Under GDPR-style rules, non-essential cookies and trackers need opt-in consent before they fire. Marketing and advertising tags nearly always fall in this group. Some regions treat basic, privacy-preserving analytics more leniently, so check the local rule.
CCPA-style rules work differently. Visitors can usually use the site first, but they must be able to opt out of the sale or sharing of their data.
| Item | Typical treatment |
|---|---|
| Essential cookies (cart, login) | No consent needed |
| Analytics cookies | Opt-in consent in most GDPR regions |
| Ad pixels and retargeting | Opt-in consent in GDPR regions; opt-out option under CCPA |
| Email newsletter signup | Explicit, separate consent in GDPR regions |
How consent flows through the site
A consent banner, often run by a consent management platform (CMP), records the visitor's choice. Your tags must then respect it. A tag that fires before the choice is made defeats the purpose of the banner.
Good banners follow a few rules:
- Make "Reject" as easy to click as "Accept".
- Do not pre-tick optional boxes.
- Let visitors change their choice later.
- Explain each purpose in plain words.
Consent on lead forms
Collecting an email address is data processing, so tell people what happens to it. Add a clear consent line next to the button. Keep marketing consent unticked by default.
<form action="/subscribe" method="post">
<label for="email">Email address</label>
<input id="email" name="email" type="email" required>
<label>
<input type="checkbox" name="marketing_consent" value="yes">
Send me the free guide and occasional marketing emails.
See our <a href="/privacy">privacy policy</a>.
</label>
<button type="submit">Get the free guide</button>
</form>Store the consent with the lead record: the date, the wording shown, and the source page. Your CRM can then prove consent later and exclude people who withdrew it.
Common errors
- Tags fire before consent. Check with your browser's network tab on a fresh visit with cookies cleared.
- Personal data in URLs. UTM parameters should hold campaign labels only. Never put an email address in a link, because it will end up in analytics reports and server logs.
- Copying a policy. Your privacy policy must describe what you actually collect and who receives it.
- Ignoring withdrawal. Unsubscribe and deletion requests must reach every system, including the CRM and email platform.
Also remember data minimization: collect only what you need. Every extra form field adds both friction and compliance burden.
Exercise
A visitor in the EU lands on your page. Your analytics tag loads immediately, and a banner appears afterward. Name the problem and one fix.
Show answer
Non-essential analytics fires before the visitor has consented. Configure the tag, usually through the CMP or tag manager, to load only after the visitor accepts analytics cookies.
Exercise
Why should a lead form store the date and wording of consent along with the email address?
Show answer
It gives you proof of what the person agreed to and when. It also lets you honor withdrawals and show compliance if asked.