Technote

Security Practical

Consent and tracking — the tag that fires first

Collect the minimum, say that you collect it, and honour a refusal. Three lines of principle, and nearly all the failures happen in one place: a tag that fired before consent was given.

Adding an analytics tool or an advertising pixel is routine marketing work. Most of the time it never touches a developer — a few clicks in a tag manager and it is live. It is convenient, and the mistakes take exactly as few clicks.

What follows is a practical checklist rather than legal advice. Which rules apply depends on where you and your visitors are, and the detail varies. But three requirements are common to every framework, and honouring those three removes most of the exposure.

Three lines of principle

Three principles — implementation effort grows downwards, and so does the failure rate

Minimum collection leads for a reason: data you never gathered cannot leak, cannot be mishandled and needs no retention schedule. In practice the principle becomes a very concrete question — is there a decision we would make differently because of this field? If not, do not collect it. The same applies to form fields; the ones added “in case we need them later” are usually the riskiest ones on the page.

Disclosure means the privacy policy describes what actually happens. The usual failure is drift: unless updating the policy is part of adding a tool, the document freezes at the moment it was first written while the site keeps changing.

The common failure — tags that fire before consent

Installing a consent banner does not by itself defer any tracking. Displaying the banner and holding the tags back are two separate pieces of work, and doing the first while forgetting the second is remarkably common.

In that state everything looks perfect. The banner appears, it has buttons, pressing one dismisses it. Meanwhile the analytics script has already executed and the cookies are already stored — set at the very moment the banner rendered. The visitor presses “decline” and none of what already happened is undone.

Why tag managers make this easy to get wrong

A tag manager exists so marketing can deploy tags without waiting for engineering. That is its virtue and the origin of this problem. When you create a tag, the default trigger is usually “all pages”, and left alone that tag fires on page load regardless of what anyone consented to.

To respect consent, the trigger has to be tied to the consent state. The mechanics differ between tools but the shape does not: the banner records the choice as a variable, and each tag takes that variable as a condition. Wire it once and every subsequent tag reuses the same condition — the first setup decides all the ones after it.

How to check it yourself

Do not trust the settings screen; look at the traffic. Open the site in a private window, press decline on the banner, and check two places in developer tools.

The post-refusal check — read the actual requests and cookies, not the configuration screen

Use the network tab to see whether anything is being sent to analytics or advertising domains, and the application (storage) tab to read the cookie list. If either shows activity after a refusal, the wiring is not in place.

Repeat the same check every time a tool is added. One new tag deployed without the condition invalidates all the careful wiring that came before it, on every page it touches.

What you can still learn without collecting more

One closing thought. It is easy to assume that less tracking means flying blind, when in fact a great deal is knowable without identifying anybody. Search performance reports tell you which queries bring people in. Server logs tell you which pages are requested and how often. And a single “how did you hear about us?” line on an enquiry form is sometimes more accurate than any automated attribution.

Honest collection is a compliance matter, but it is also a trust matter. A site that states plainly what it gathers reads differently, and readers notice.

Metric design and data quality are covered in the no measurement, no improvement series, and retention and disposal of what you do collect live in the security archive. If you want to start by finding out which scripts actually load on your site, that check is part of the diagnostic in our optimization program.

More on this topic

All technotes

Security Intro

Hardening starts by counting your administrators

However many doors you close in configuration, eight people holding keys means eight things to protect. A role audit comes before every other hardening step.

Site operators 7 min read

₩270,000 · Join the program