GRAFWERK

Analytics · 15 June 2026

Implementing cookie banners and consent correctly for clean tracking

Almost every website today shows a cookie banner. For many it's an annoying pop-up that you quickly click away. Yet behind it lies a serious question: may I as a website operator know how visitors use my site, and if so, from when? Whoever solves the cookie banner consent topic cleanly stays on the legally safe side and still keeps usable numbers. In this post I'll show you how to do that without data loss.

Why is consent needed at all?

As soon as you use tools like Google Analytics, data about your visitors is collected and often transferred to servers abroad. The new Swiss Data Protection Act (revDSG) and the European GDPR require you to inform your visitors about this. For tools that aren't strictly necessary for the operation of the site, you need active consent in many cases.

The most important point: genuine consent must be voluntary. That means tracking scripts may only load once the person has deliberately clicked "Accept". Banners that already measure in the background before the click are exactly what you want to avoid.

The most common mistake: tracking before anyone consents

Many banners look correct but load the analytics scripts immediately on page load anyway. The banner is then pure decoration. The only clean solution is the one where truly nothing happens without a click: no scripts, no cookies, no data transfer.

That's exactly how I've implemented it on my own site too. Google Analytics only loads after someone has actively chosen "Accept". Before that, nothing is active in the background. That's the strictest, but also the most honest variant.

Won't I then lose valuable data?

That's the worry I hear most often. The honest answer: yes, a portion of visitors click "Decline" or ignore the banner, and these people don't appear in your statistics. But that's not as bad as it sounds.

  • Trends stay visible. Even with 60 to 80 percent of visitors, you recognise which pages perform well and where your traffic comes from.
  • Quality over completeness. Better somewhat less data but legally solid, than a complete picture with a risk of warnings.
  • A good banner helps. Whoever explains clearly and kindly what it's about gets considerably more consent than with an off-putting wall-of-text pop-up.

This is what a good cookie banner looks like

A good banner isn't a legal obstacle, but a short, fair notice. What matters:

  • Equivalent buttons. "Accept" and "Decline" must be equally visible. A garishly coloured yes button next to a hidden no link doesn't count as a free choice.
  • Clear language. Say in one sentence what you measure and why, instead of disappearing into paragraphs.
  • Withdrawal at any time. Visitors must be able to change their decision later, for example via a small link in the footer.
  • Link to the privacy policy. There it says in detail which tools you use and what rights visitors have.

And the privacy policy?

The banner is only half the battle. Along with it goes an honest privacy policy that names which services you use, who's behind them and where the data flows. If you use Google Analytics, for example, it should state there that Google processes the data, that a transfer to the USA is possible and on what basis that happens. That builds trust and is an obligation at the same time.

My practical advice for SMEs

You don't have to become a privacy expert. It's enough to consistently implement a few principles: tracking only after consent, equivalent buttons, withdrawable at any time and an honest privacy policy. Whoever observes this has a solution that's fair to visitors and lets you sleep soundly.

Technically this is well achievable without making the site slow or cluttered. On a cleanly built website the banner is a small, discreet element that appears exactly when it's needed, and otherwise doesn't disturb.

If you're unsure whether your current banner really measures cleanly or only pretends to, feel free to look into more posts or get in touch with me directly. You can reach me via the contact form, and I'll tell you honestly whether there's a need for action on your side or whether everything's fine.

You might also like