GDPRChecker

Home / Knowledge Base / Spain Google Analytics Consent Requirements: A Practical Guide for Website Owners

Website Compliance

Spain Google Analytics Consent Requirements: A Practical Guide for Website Owners

A practical guide to Spain Google Analytics consent requirements under GDPR, covering implementation steps, common mistakes, and validation with GDPRChecker. Learn how to configure Consent Mode, set up a compliant cookie banner, and avoid fines.

Run a free GDPR compliance scanPreview the findings before choosing a CMP.

Author

GDPRChecker Editorial Team

Reviewed by

Privacy & Compliance Research Team

Last updated

July 2026

Reading time

12 min read

Educational guidance for compliance readiness — not legal advice. Requirements vary by jurisdiction and your specific processing activities.

Introduction

Updated for 2026 compliance practices.

If you run a website that uses Google Analytics and targets users in Spain, understanding Spain Google Analytics consent requirements is no longer optional—it’s a critical part of your GDPR compliance strategy. The Spanish Data Protection Agency (AEPD) aligns with the European Data Protection Board (EDPB) guidelines, which means that analytics cookies and tracking technologies generally require prior, informed, and unambiguous consent. See EDPB Guidelines 05/2020 on consent. This guide walks you through what Spain Google Analytics consent requirements mean in practice, how to implement them step by step, and how to verify your setup using GDPRChecker’s scanning tools.

We’ll focus on technical implementation and verification, not legal advice. For legal questions, consult a qualified privacy professional. But if you’re looking to close the Consent Mode gap, the Google CMP gap, or the Cookie Banner gap on your site, you’re in the right place.

Requirements and Compliance Expectations

To meet Spain Google Analytics consent requirements, you need to address several layers of compliance:

1. Cookie Banner and Consent Collection

Your website must display a cookie banner that: - Appears before any non-essential scripts run. - Clearly lists the purposes of cookies, including analytics. - Offers a “Reject All” button that is as prominent as the “Accept All” button. - Allows users to granularly select which categories of cookies they accept. - Blocks all non-essential cookies until consent is given.

In Spain, the AEPD expects that the banner does not use deceptive design patterns (dark patterns) that nudge users toward acceptance. For example, making the “Reject” option hard to find or using colors that downplay it could be considered non-compliant.

2. Google Analytics Configuration

Even with consent, you must configure Google Analytics to respect user privacy: - Enable IP anonymization (or use GA4, which anonymizes IPs by default). - Disable data sharing with Google for advertising purposes unless you have separate consent. - Set appropriate data retention periods. - Ensure that no personally identifiable information (PII) is sent to Google Analytics.

3. Consent Mode Implementation

Google Consent Mode v2 is now required for many Google services, including Google Analytics, if you want to use features like audience building or if you’re subject to the Digital Markets Act (DMA). Consent Mode v2 introduces two new consent signals: ad_user_data and ad_personalization, in addition to the existing analytics_storage and ad_storage. For Spain Google Analytics consent requirements, the analytics_storage signal is crucial. When set to denied, Google Analytics will not use cookies for measurement and will instead rely on conversion modeling (if available) based on cookieless pings.

4. Privacy Policy Disclosures

Your privacy policy must clearly disclose: - The use of Google Analytics. - The types of data collected. - The purposes of processing. - The legal basis (consent). - How users can withdraw consent. - Information about international data transfers, if applicable.

5. Data Subject Access Rights (DSAR)

Under GDPR, users have the right to access, rectify, delete, and port their data. If you use Google Analytics, you must be able to respond to DSARs that involve analytics data. This can be challenging because Google Analytics data is often pseudonymized and aggregated. You should have a process in place to handle such requests, even if the data is not directly identifiable.

How to Implement Step by Step

Implementing Spain Google Analytics consent requirements involves both technical and procedural steps. Here’s a practical walkthrough:

Step 1: Choose a Consent Management Platform (CMP)

Select a CMP that integrates with Google Consent Mode v2. While GDPRChecker does not endorse specific CMPs, you should look for one that: - Supports the IAB TCF v2.2 framework if you run ads. - Can fire Google Consent Mode defaults before any tags load. - Allows customization of the banner to meet AEPD guidelines.

If you do not run Google Ads, you might wonder, “Do I need a CMP if I do not run Google Ads?” The answer is yes—you still need a CMP to manage consent for Google Analytics and any other cookies. A CMP simplifies the process of obtaining and storing consent, and it helps you demonstrate compliance.

Step 2: Configure Google Consent Mode Defaults

Before any tags fire, set the default consent state. This is typically done by placing a small script in the <head> of your pages, before the Google Tag Manager (GTM) snippet. For example:

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
  'analytics_storage': 'denied',
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'wait_for_update': 500
});

This ensures that Google tags respect the denied state until the user updates their consent. The wait_for_update parameter tells Google tags to wait for a consent update before firing, which is useful if your CMP loads asynchronously.

Step 3: Integrate CMP with Consent Mode

Your CMP should update the consent state when the user makes a choice. This is done by pushing an update to the data layer:

gtag('consent', 'update', {
  'analytics_storage': 'granted',
  'ad_storage': 'denied' // if user only accepted analytics
});

Make sure your CMP fires this update before GTM loads or as early as possible. If your CMP is Google-certified, it will handle this integration automatically. However, even non-certified CMPs can work if they support the Consent Mode API.

Step 4: Adjust Google Tag Manager Triggers

In GTM, you should set up triggers that respect consent. For Google Analytics tags, use the built-in consent settings in GA4 tags. You can also create custom triggers that fire only when consent is granted. For example, you might create a trigger that fires on all pages but only when analytics_storage equals granted.

Step 5: Test Pre-Consent Behavior

Before going live, test your setup thoroughly: - Clear your browser cookies and local storage. - Visit your site and check that no Google Analytics cookies are set before consent. - Use browser developer tools to monitor network requests: you should see no requests to google-analytics.com or googletagmanager.com that set cookies until consent is given. - If using Consent Mode, you may see cookieless pings to Google Analytics even when consent is denied. These are expected and do not set cookies.

Step 6: Implement a Reject Flow

Ensure that when a user clicks “Reject All,” all non-essential cookies are blocked, and Consent Mode signals are set to denied. Test this flow just as rigorously as the accept flow.

Step 7: Update Your Privacy Policy

Add a section about Google Analytics, including: - The purpose of data collection. - The legal basis (consent). - How to withdraw consent (e.g., by changing cookie preferences). - Links to Google’s privacy policy and opt-out mechanisms.

Step 8: Handle DSARs

Establish a process for responding to DSARs that involve Google Analytics data. This might involve exporting data from Google Analytics, deleting user data if possible, or explaining that the data is not personally identifiable.

Common Mistakes and How to Avoid Them

Even well-intentioned website owners make mistakes when implementing Spain Google Analytics consent requirements. Here are some of the most common pitfalls:

1. Firing Tags Before Consent

This is the most frequent violation. Many sites load Google Analytics via GTM without setting default consent to denied. As a result, cookies are set before the user interacts with the banner. To avoid this, always set default consent to denied and ensure your CMP updates consent before tags fire.

2. Using Implied Consent

In Spain, implied consent (e.g., “by using this site, you agree to cookies”) is not valid. You must obtain explicit, affirmative action. Make sure your banner does not rely on scrolling or continued browsing as consent.

3. Not Offering a Reject Option

Some banners only have an “Accept” button, forcing users to accept cookies to use the site. This is non-compliant. Always include a “Reject All” button that is equally prominent.

4. Ignoring Consent Mode v2

If you use Google Analytics and are subject to the DMA, or if you want to use audience features, you need Consent Mode v2. Many sites are still on v1 or have not implemented Consent Mode at all. Upgrading to v2 is essential for future-proofing your compliance.

5. Poor Banner Design

Dark patterns, such as making the “Reject” button hard to find or using confusing language, can lead to non-compliance. The AEPD has issued guidelines on banner design; follow them closely.

6. Not Testing After Changes

After updating your CMP, GTM, or privacy policy, always test your site. A small change can break consent flows. Use GDPRChecker’s scanner to verify that pre-consent network requests are blocked and that banners behave correctly.

7. Forgetting About DSARs

Many website owners focus on cookies and forget about data subject rights. Ensure you can handle DSARs related to Google Analytics data.

How to Validate with GDPRChecker

Once you’ve implemented Spain Google Analytics consent requirements, you need to verify that everything works as expected. GDPRChecker’s scanning tools can help you close the Consent Mode gap, the Google CMP gap, and the Cookie Banner gap.

Here’s how to use GDPRChecker for validation:

  1. Scan for Pre-Consent Network Requests: Run a scan of your website with GDPRChecker. It will detect any network requests that occur before consent, including those to Google Analytics domains. If any are found, you’ll know exactly which tags are firing prematurely.
  1. Check Banner Behavior: GDPRChecker can simulate user interactions with your cookie banner to ensure that it appears correctly, that the “Reject” flow works, and that consent states are updated properly.
  1. Verify Consent Mode Signals: The scanner checks whether Consent Mode defaults are set correctly and whether updates are sent after user interaction. This helps you confirm that analytics_storage is denied by default and only changes to granted after consent.
  1. Audit Privacy Policy Disclosures: GDPRChecker can analyze your privacy policy for required disclosures about Google Analytics and cookies. It flags missing or incomplete information.
  1. Monitor for Changes: Compliance is not a one-time task. Use GDPRChecker to schedule regular scans and get alerts if something changes—like a new tag that fires without consent.

By integrating GDPRChecker into your workflow, you can catch issues before they lead to fines or user complaints. Remember, GDPRChecker provides technical validation, not legal advice. Always consult a privacy professional for legal interpretations.

Implementation Checklist

Use this checklist to ensure you’ve covered all aspects of Spain Google Analytics consent requirements:

  1. To do: Choose a CMP that supports Google Consent Mode v2.
  2. To do: Set default consent state to denied for analytics_storage and other relevant signals.
  3. To do: Place the default consent script before any GTM or Google Analytics code.
  4. To do: Configure your CMP to update consent state upon user action.
  5. To do: Set up GTM triggers to respect consent states.
  6. To do: Test that no Google Analytics cookies are set before consent.
  7. To do: Test the “Reject All” flow to ensure all non-essential cookies are blocked.
  8. To do: Verify that cookieless pings are sent when consent is denied (if using Consent Mode).
  9. To do: Update your privacy policy with Google Analytics disclosures.
  10. To do: Establish a DSAR process for analytics data.
  11. To do: Run a GDPRChecker scan to validate pre-consent behavior and banner functionality.
  12. To do: Schedule regular scans to monitor ongoing compliance.

FAQ

What is Spain Google Analytics consent requirements? Spain Google Analytics consent requirements refer to the obligation under GDPR and Spanish law to obtain prior, explicit consent from users before deploying Google Analytics cookies or tracking technologies. This includes configuring Consent Mode, using a compliant cookie banner, and ensuring no analytics tags fire without consent.

Do I need Spain Google Analytics consent requirements for GDPR? Yes, if your website targets users in Spain and uses Google Analytics, you must comply with these requirements. The AEPD and EDPB consider analytics cookies non-essential, so consent is mandatory. Failure to comply can result in fines and enforcement actions.

How do I implement Spain Google Analytics consent requirements? Implement by: (1) choosing a CMP that integrates with Google Consent Mode v2, (2) setting default consent to denied, (3) updating consent state based on user choice, (4) configuring GTM triggers, and (5) testing thoroughly. See the step-by-step section above for details.

How can I verify Spain Google Analytics consent requirements with a scanner? Use GDPRChecker to scan your site for pre-consent network requests, check banner behavior, verify Consent Mode signals, and audit privacy policy disclosures. The scanner provides actionable reports to help you close compliance gaps.

What are common Spain Google Analytics consent requirements mistakes? Common mistakes include firing tags before consent, using implied consent, not offering a reject option, ignoring Consent Mode v2, poor banner design, not testing after changes, and forgetting about DSARs. Regular scanning with GDPRChecker can help catch these issues.

Next Steps

Meeting Spain Google Analytics consent requirements is an ongoing process. Start by auditing your current setup with GDPRChecker’s scanner to identify gaps. Then, work through the implementation checklist, and don’t forget to explore our related guides for deeper dives:

Ready to close the gaps? Run your first GDPRChecker scan today and ensure your Spain Google Analytics consent requirements are fully met.

GDPRChecker guides are educational resources and do not constitute legal advice. Use them to understand technical and operational privacy requirements, and consult qualified counsel for legal interpretation.

Check Your Website in Under 60 Seconds

  • Sign in required
  • GDPR-focused checks
  • Cookie banner detection
  • Privacy policy verification