Zum Hauptinhalt springen
Alle Anleitungen
Schwerwiegend KVKK m.5 · GDPR Art. 6 · ePrivacy Art. 5(3) · Analytics

Stop Google Analytics from loading before consent (KVKK/GDPR)

Google Analytics (GA4) sets identifiers and sends the visitor’s IP and page data to Google the moment it loads. If that happens before the visitor accepts cookies, it is processing without a legal basis.

Warum es wichtig ist

Analytics is non-essential, so under KVKK Art. 5 and the ePrivacy rule (GDPR Art. 6) it needs prior consent. GA4 also sends data to Google in the US, engaging cross-border transfer rules. A tag that fires on page load — before anyone clicks "Accept" — is the single most common finding in a privacy scan.

So beheben Sie es

Load GA only after opt-in. The cleanest way is Google Consent Mode v2: set the defaults to "denied" before any Google tag initialises, then update to "granted" from your consent banner’s accept callback. Until consent, GA stays dormant (or sends only cookieless pings, if you enable that).

<!-- BEFORE any Google tag: default everything denied -->
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('consent', 'default', {
    ad_storage: 'denied',
    analytics_storage: 'denied',
    wait_for_update: 500
  });
</script>

<!-- In your consent banner's Accept handler -->
gtag('consent', 'update', { analytics_storage: 'granted' });

Quick check: Does my website set cookies before consent?

Hat Ihre Website dieses Problem?

Starten Sie einen kostenlosen Scan und finden Sie es in Sekunden heraus.

Offizielle Quellen

Links zu den Rechtsquellen zur Orientierung. PrivaScan ist mit diesen Stellen nicht verbunden; dies ist eine Information, keine Rechtsberatung.

Verwandte Anleitungen

Diese Anleitungen behandeln automatisierte Prüfungen von Trackern, Cookies und Datenflüssen. Eine vollständige Datenschutzprüfung erfordert auch rechtliche Expertise.

Auch von Talivio: A11yProof TCSR CanopyProof Alle Talivio-Produkte Talivio Technology OÜ · Tallinn, Estonia Made by Talivio.