5 min read
    GDPR compliance checklist for developers: scripts, consent, audit

    AI-generated (Gemini Pro)

    GDPR Compliance Checklist for Developers (Technical Guide)

    GDPR Compliance Checklist for Developers (Technical Guide)

    If you build websites, GDPR is your responsibility: what you ship — scripts, consent logic, and data flows — directly affects compliance. This technical guide gives developers a practical checklist: block scripts before consent, implement a real consent banner, avoid common mistakes, and audit your implementation.

    Consent before tracking
    Under GDPR and ePrivacy, non-essential cookies and trackers must not run until the user has given valid consent. As a developer you must gate analytics, ads, and other non-essential scripts on the consent state — not load them on first page load.
    Consent banner (technical)
    The banner must not only show a notice; it must drive the technical state (e.g. consent granted/denied) that controls whether scripts load or fire. If scripts run before the user accepts, the implementation is wrong.
    Runtime audit
    Testing the site in a real browser to see what actually loads and when. The only reliable way to verify that nothing runs before consent; static checks of HTML or config are not enough.

    Developers own the implementation: when scripts load, how the consent state is set, and what data is sent where. GDPR compliance for websites depends on that behaviour — block non-essential scripts until consent, implement a banner that actually controls loading, and audit so you don’t ship violations. This guide covers a developer checklist, common mistakes (e.g. analytics loading automatically), and how to audit with a runtime scanner. For product and pricing, see SecureSpells and pricing.

    This article is for educational purposes and does not constitute legal advice. For compliance decisions, consult a qualified legal or privacy professional.


    Developer checklist

    1. Block scripts before consent

    Do not load or execute non-essential scripts (analytics, ads, pixels, session tools) until the user has consented. Options:

    • Load scripts only after consent (e.g. inject or enable them in a callback when the user accepts).
    • Use a tag manager or CMP that respects consent state and does not fire tags on “All Pages” or “Page View” until consent is granted.
    • Default consent state to “denied”; only switch to “granted” after an explicit accept.

    If any non-essential script runs on first load before consent, the implementation is non-compliant.

    2. Implement a consent banner that actually controls loading

    The consent banner must drive the technical state. When the user accepts, set the consent state and then load or enable trackers; when they reject or before they choose, do not load them. A banner that only shows UI but does not gate script loading is insufficient. Guide: Cookie banner compliance guide.

    3. Audit your implementation

    Configuration and code can be wrong without you noticing. Runtime audit your site: visit without accepting cookies and verify (or use a scanner) that no analytics, ads, or other non-essential requests run. Only runtime testing confirms behaviour.

    Audit what you built: Run a runtime scan to see if any scripts or requests fire before consent.

    Run a free audit: SecureSpells.


    Common developer mistakes

    • Analytics loads automatically — Google Analytics (or similar) included on every page and firing on load, without a consent check. One of the most frequent violations. Fix: load or fire GA only after consent (e.g. via Consent Mode and gating the tag).
    • Tag manager fires all tags on page view — GTM (or similar) configured to fire analytics/ad tags on “All Pages” or “Page View” without a consent trigger. Fix: add a consent check to triggers and set default state to denied.
    • Banner is cosmetic only — The banner updates the UI but does not set or read a consent state that scripts use. Fix: wire the banner to a single source of truth (e.g. CMP or your own state) and gate all non-essential scripts on it.

    Related: How trackers bypass cookie consent, Google Analytics GDPR guide.


    How to audit your implementation

    Use a runtime compliance scanner: it loads your site in a real browser and reports which scripts and network requests run, and when. Check that nothing non-essential runs before consent. SecureSpells runs this check in under a minute — run it after every significant change to tracking or consent logic.


    Final takeaway

    As a developer, you own the technical side of GDPR: script loading order, consent state, and data flows. Block non-essential scripts until consent, implement a banner that actually controls loading, and always audit with a runtime test before assuming you’re compliant. Always audit: SecureSpells.

    Verify your implementation: Run a free runtime audit.


    Frequently asked questions

    What do developers need to do for GDPR compliance?

    Gate non-essential scripts (analytics, ads, pixels) on consent: do not load or fire them until the user has accepted. Implement a consent banner that sets and respects this state. Document what you collect (privacy policy) and test with a runtime audit to confirm nothing runs before consent.

    What is the most common GDPR mistake developers make?

    Loading analytics (e.g. Google Analytics) or other trackers on every page without a consent check. They run on first visit, before the user has accepted cookies. Fix by loading or firing them only after consent and verifying with a runtime scan.

    How do I test if my implementation is GDPR compliant?

    Run a runtime audit: use a tool that loads your site in a real browser and reports what scripts and requests run and when. Visit without accepting cookies; if any non-essential tracking runs, the implementation is wrong. SecureSpells does this: Run free audit.

    Does a cookie banner alone make a site compliant?

    No. The banner must technically prevent non-essential scripts from running until consent. If the banner is only visual and scripts still load on first visit, you are not compliant. Implement gating in code or via a CMP/tag manager that respects consent state.


    Related articles

    Share:

    Share:
    SecureSpells

    SecureSpells

    Find GDPR risks on your live site before regulators do

    Check it out on Product Hunt →

    Read Next

    Continuous Privacy Monitoring

    Stop Privacy Violations
    Before They Happen

    Don't wait for a privacy violation to cost you thousands. Your privacy spells need a little work... but we've got the magic to fix them instantly.

    Free audit included
    Risk score report
    No credit card