GDPR Website Compliance Checklist for Developers (2026)

GDPR website compliance checklist: consent before tracking, cookie banners, privacy notices, data requests, forms and third-party scripts, each with a test.

· BugViso Team

16 min read

GDPR website compliance means no tracking script, cookie or third-party request touches a visitor's data before valid consent. Your privacy notice, cookie banner and data-subject processes must also be accurate.

The most common failure is scripts that fire before the visitor accepts. This checklist covers consent, cookies, third parties, policies and how to test the bare page load.


GDPR Requirements for Websites: The Core Pillars of GDPR and ePrivacy

Web privacy compliance in the European Union (and under analogous regulations like the UK GDPR and California CCPA/CPRA) is governed by two complementary legal frameworks:

RegulationPrimary regulatory focusCore compliance rule
GDPR (Regulation EU 2016/679)Processing of personal data (IPs, user IDs, device fingerprints)Requires a lawful basis (legitimate interest or explicit consent)
ePrivacy Directive ("The Cookie Law")Storing or accessing information on user terminal devices (cookies, LocalStorage)Requires prior explicit consent for all non-essential trackers
  1. A visitor lands on the website.
  2. Is data stored on the device, or personal data processed? If yes, sort it into one of two groups:
    • Strictly necessary (auth tokens, CSRF, cart state): the lawful basis is legitimate interest or contract, and it is allowed before consent.
    • Non-essential (analytics, pixels, session replays): the lawful basis is explicit prior user consent, and it must be blocked strictly until consent is given.

1. What Constitutes Personal Data on the Web?

Under the European Commission data protection framework, "personal data" includes any information that directly or indirectly identifies a natural person. In web development, this encompasses:

  • IP Addresses: Both IPv4 and IPv6 addresses (even if dynamic).
  • Unique Cookie Identifiers: High-entropy pseudo-anonymous tokens (_ga, _fbp, ajs_user_id).
  • Device Fingerprints: Canvas hashes, screen resolution strings, and user agent combinations.

According to EDPB Guidelines on Consent, user consent is legally valid only when it satisfies five cumulative criteria:

  1. Freely Given: Users cannot be denied access to core site features for refusing non-essential cookies (prohibiting "cookie walls").
  2. Specific: Consent must be granular; agreeing to basic analytics does not authorize ad retargeting.
  3. Informed: Users must know which vendors receive data and for what specific purposes.
  4. Unambiguous: Implied consent (such as "by continuing to browse, you agree to cookies") is illegal.
  5. Explicit Prior Action: Non-essential tracking scripts must never execute until the user clicks an affirmative "Accept" button.

To implement compliant script controls, every cookie, local storage key, and session storage entry must be categorized into one of four functional tiers:

Category TierTechnical ExamplesConsent Prerequisite
Strictly NecessaryAuth tokens, CSRF session, cart stateNO CONSENT REQUIRED (Exempt under ePrivacy)
Functional / PreferencesUI theme (dark), language selectionPrior Consent Required (Unless user-requested)
Analytics / PerformanceGoogle Analytics, PostHog, PlausiblePRIOR EXPLICIT CONSENT REQUIRED in EU/UK
Marketing / RetargetingMeta Pixel, TikTok Pixel, Google AdsPRIOR EXPLICIT CONSENT STRICTLY MANDATORY
Cookie identifierVendor / originCompliance category
session_id, XSRFApplication hostStrictly necessary (exempt)
theme_preferenceApplication hostFunctional (user-requested)
_ga, _ga_*Google AnalyticsAnalytics (consent required)
_fbp, _fbcMeta / FacebookMarketing (consent required)
_hjSessionUser_*Hotjar / heatmapsAnalytics (consent required)
li_sugr, bcookieLinkedIn InsightMarketing (consent required)

For complete technical specifications on managing client-side browser storage and header attributes, consult the MDN Web Docs Cookies and Storage API documentation.


Most GDPR compliance failures on websites aren't caused by missing privacy policies. They come from architectural pre-consent tracking leakage.

In our study of websites tracking before consent, a third of European-domain homepages that showed a cookie banner had already written analytics or advertising cookies before the visitor clicked anything. Our cookie compliance scanner guide shows how to test your own bare page load.

Non-compliant workflow (fails GDPR audits):

  1. The HTML parser reads <head>.
  2. <script src="https://connect.facebook.net/en_US/fbevents.js"> executes immediately on bare page load. It sets the _fbp cookie and transmits the client IP and URL to Meta servers.
  3. <script src="https://cookie-banner-vendor.com/banner.js"> renders the banner 400ms later ("We value your privacy").
  4. Violation: data was already sent before the user saw the banner.

Compliant workflow (passes GDPR audits):

  1. The HTML parser reads <head>.
  2. Third-party trackers are intercepted and blocked.
  3. The cookie banner renders.
  4. The user clicks "Accept Marketing".
  5. The Meta Pixel script is injected and executed dynamically.

Why Script Bundlers Cause Compliance Leaks

When developers import tracking libraries directly into single-page application entry points (e.g., import ReactGA from 'react-ga4'; ReactGA.initialize('G-XXX'); inside main.tsx), the analytics bundle runs synchronously upon JavaScript evaluation, completely bypassing the visual cookie banner.


To achieve rock-solid GDPR compliance, your frontend architecture must defer script injection until the user's explicit consent state is verified.

Method 1: The Script MIME-Type Interception Pattern

Before consent is granted, third-party scripts can be written with an inert type="text/plain" attribute and custom data-src properties. Browsers ignore scripts with non-JavaScript MIME types:

html
<!-- INERT BEFORE CONSENT: Browser will NOT download or execute this script -->
<script 
  type="text/plain" 
  data-category="marketing" 
  data-src="https://connect.facebook.net/en_US/fbevents.js"
></script>

<!-- Tag Manager Wrapper -->
<script>
  function enableCategory(category) {
    document.querySelectorAll(`script[type="text/plain"][data-category="${category}"]`).forEach(inertScript => {
      const activeScript = document.createElement('script');
      activeScript.src = inertScript.getAttribute('data-src');
      activeScript.type = 'text/javascript';
      document.head.appendChild(activeScript);
      inertScript.remove();
    });
  }

  // When user clicks "Accept Marketing" in the banner:
  // enableCategory('marketing');
</script>

Google Consent Mode v2 integrates with tag managers to adjust tag behavior based on user consent states (analytics_storage, ad_storage, ad_user_data, ad_personalization):

html
<!-- Must be placed BEFORE Google Tag Manager or gtag.js in <head> -->
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

  // Default: Deny all non-essential storage prior to consent
  gtag('consent', 'default', {
    'analytics_storage': 'denied',
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'wait_for_update': 500
  });
</script>

<!-- Google Tag Manager / Analytics loaded here -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>

<script>
  // When user accepts Analytics and Marketing in your custom CMP:
  function onConsentAccepted() {
    gtag('consent', 'update', {
      'analytics_storage': 'granted',
      'ad_storage': 'granted',
      'ad_user_data': 'granted',
      'ad_personalization': 'granted'
    });
  }
</script>

Managing Third-Party Data Transfers and IP Address Anonymization

Under the GDPR's "Schrems II" precedent, sending personal data (including raw IP addresses) to servers in non-adequate third countries can violate EU transfer restrictions. That applies when there are no standard contractual clauses and supplementary technical measures.

Third-Party ComponentRecommended Privacy Architecture
Google FontsSelf-host font files locally on domain
CDN Scripts (jQuery, etc)Self-host in application vendor bundle
Server-Side TaggingProxy analytics via own first-party proxy
Transport SecurityEnforce HTTPS and modern TLS encryption

Self-Hosting Google Fonts

German and Austrian regional courts have issued fines against website operators for loading Google Fonts directly from fonts.googleapis.com without consent, because the HTTP connection transmits visitor IP addresses directly to Google servers.

Download the .woff2 font files and serve them locally from your own domain origin:

css
/* COMPLIANT: Locally Hosted Font */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-v12-latin-regular.woff2') format('woff2');
}

To review how transport encryption and secure headers safeguard your site against eavesdropping, read our security headers guide: CSP, HSTS, and X-Frame-Options.


How BugViso Automates GDPR & Privacy Auditing on the Bare Page Load

Manually verifying whether cookies are set before consent requires clearing all browser cookies, inspecting the Network panel, opening Application storage, and analyzing outgoing requests across dozens of pages.

BugViso integrates an automated Privacy & Compliance Audit Engine that simulates a fresh, un-consented first-time visitor on every scan:

  1. A target URL is submitted to the scanner, which loads it in a clean headless Chromium sandbox with zero cached cookies, a fresh device identity and no pre-stored state.
  2. Bare page load execution: navigates to the URL and records network and storage activity.
  3. Cookie and LocalStorage categorization: classifies cookies as necessary or marketing, and flags tracking cookies set before any user click.
  4. Third-party host and beacon inspection: inspects outgoing XHR, fetch and pixel network beacons, and identifies advertising hosts (Facebook, TikTok).
  5. Consent Management Platform (CMP) detection: verifies that an active CMP integration is present.
  6. The result is a prioritized remediation playbook plus a branded PDF privacy report.

When BugViso scans a site, the privacy worker executes the following checks:

  1. Bare Page Load Inspection: BugViso audits the page state before any click or user interaction occurs, capturing all cookies, local storage keys, and third-party network requests initialized automatically.
  2. Pre-Consent Tracking Detection: Flags tracking cookies (such as _fbp, _gcl_au, or ad beacons) that fire prematurely on the un-consented page load—the exact vulnerability that triggers regulatory fines.
  3. Consent Platform Verification: Detects the presence of leading Consent Management Platforms (CMPs) and evaluates whether third-party tracking scripts are properly deferred.
  4. Actionable Remediation Playbook: Generates developer-ready fix instructions and host attributions in both the web dashboard and downloadable executive PDF report. To understand how privacy health fits alongside accessibility and performance, review our how to check ADA website compliance and what a website audit is.

You can see every rule BugViso applies in its security and privacy audit. Privacy is one part of a full review; our comparison of website security audit tools covers the rest.


GDPR Website Compliance Checklist: Step by Step (2026)

Execute this step-by-step technical checklist to ensure full regulatory compliance:

Checklist PhaseTechnical Verification Task
Cookie & Tracker AuditCatalog all first and third-party cookies
Pre-Consent BlockingConfirm ZERO tracking cookies on load
Banner UX ParityEnsure "Reject All" button is equal in size and prominence to "Accept All"
Granular Consent TiersAllow toggling Analytics vs Marketing
Consent RevocationProvide persistent floating button or footer link to modify cookie preferences
Privacy Policy UpdatingList all cookie vendors, purposes, TTLs
Secure Data TransmissionEnforce HTTPS across all application URLs

Common GDPR Mistakes and How to Avoid Them

Avoid these widespread compliance anti-patterns:

Anti-Pattern TrapCompliant Production Solution
"Reject" Button HiddenMake "Reject All" as prominent as Accept
Pre-Ticked CheckboxesDefault all non-essential toggles to OFF
Implied Scroll ConsentRequire explicit affirmative click
No Revocation LinkAdd "Cookie Settings" link to footer

Providing a prominent green "Accept All" button while hiding the reject option behind three layers of nested settings menus is explicitly prohibited by the European Data Protection Board. The "Reject All" button must be visually equal in prominence and require no more clicks than "Accept All."

In the landmark Planet49 ruling (C-673/17), the European Court of Justice confirmed that pre-ticked checkboxes do not constitute valid consent. All non-essential categories (Analytics, Marketing) must be toggled OFF by default.


Frequently Asked Questions About GDPR Website Compliance

These are the questions site owners ask most about GDPR website compliance.

Does GDPR apply to websites based outside the European Union?

Yes. Under Article 3(2) of the GDPR (extraterritorial effect), the regulation applies to any website or online service worldwide that offers goods or services to individuals in the EU or monitors their behavior (such as through tracking cookies and analytics).

No. Under the ePrivacy Directive and EDPB guidelines, analytics cookies (including standard Google Analytics tags) store identifiers on the user's device and are not strictly necessary to deliver the requested service. Therefore, prior explicit consent is mandatory in the EU and UK before firing analytics cookies.

What is the maximum fine for GDPR non-compliance?

Data Protection Authorities can issue administrative fines of up to €20 million or 4% of total worldwide annual turnover (whichever is higher) for serious infringements under Article 83 of the GDPR.

A Privacy Policy is a broad legal document explaining how an organization collects, uses, stores, and protects personal data across all business operations. A Cookie Policy (or cookie declaration) is a specific document that lists all cookies and tracking technologies used on the website, their technical purposes, expiration durations, and third-party recipients.

Under GDPR Article 7(3), withdrawing consent must be as easy as giving consent. Web applications must provide a persistent method—such as a floating cookie settings icon or a "Cookie Preferences" link in the global footer—that allows visitors to change their preferences at any time.


Summary and Next Steps

GDPR website compliance takes an engineering-driven privacy architecture. Classify all tracking cookies accurately, block scripts before consent, remove dark patterns from banner designs, give rejection equal prominence, and self-host third-party assets.

Verifying that tracking pixels and analytics cookies never fire before affirmative consent takes automated monitoring. A BugViso audit inspects your bare page load, categorizes cookies, and identifies pre-consent privacy leaks.

Written by

· BugViso Team

Kazi writes BugViso’s guides on website audits, Core Web Vitals, technical SEO, accessibility and AI search. The data in them comes from audits BugViso runs in a real Chromium browser, including our 219-site study of website health.

Found this useful? Share it.

Summarise with AI

Open this guide in your assistant.

Follow BugViso

New guides and audit data as we publish them.

AI visibility tracker

Is your brand in AI answers?

See how often AI assistants mention you, cite your site and rank you against your competitors.

  • ChatGPT
  • Gemini
  • Perplexity
  • Claude
  • AI Overviews
See how it works

See where your site stands

Run a free BugViso audit for SEO, speed, accessibility and AI search readiness — with fixes you can ship today.