DPO Radio

Free Website Privacy Check: Ensure Your Site's Compliant Now!

GDPR-Compliant Google Analytics Setup with AesirX CMP

GDPR-Compliant Google Analytics Setup with AesirX CMP

How to Add Google Analytics to WordPress for GDPR Compliance Using AesirX CMP

Google Analytics provides valuable insights into website traffic and user behavior, but GDPR and ePrivacy Directive (ePD) compliance requires user consent before data collection. 

This guide shows you how to integrate Google Analytics with AesirX Consent Management Platform (CMP) so tracking only occurs after users grant consent. 

You'll learn how to configure consent settings, block tracking scripts until approval, and maintain full compliance while using analytics effectively. 

Note:

  • WordPress installed.
  • For sites already using Google Analytics and Google Tag Manager (GTM): Remove existing Google Analytics but keep existing GTM tags.
  • For sites without Google Analytics and GTM: Create Google Analytics and GTM accounts first.

How_to_Add_Google_Analytics.png

Step 1: Set Up Google Analytics and Google Tag Manager

1. Create Google Analytics and GTM accounts:

2. Copy your Tracking ID and GTM Container ID:

  • Find these IDs in the respective dashboards; you’ll need them later.

Step 2: Install AesirX CMP and Activate Your Trial

1. Download and Install AesirX CMP

  • Download the plugin: Get the latest release from AesirX CMP Plugin on GitHub.
  • Install the plugin:
    • Log in to your WordPress admin panel.
    • Go to Plugins > Add New.
    • Click Upload Plugin, select the downloaded file, and click Install Now.
    • Click Activate Plugin after installation.

2. Register Your Shield of Privacy (SoP)

Sign up for a Shield of Privacy (SoP) account to activate your 14-day free trial with full features. (Note: Your SoP serves as your AesirX Account ID, giving you access to all AesirX solutions and licenses.)

  • Go to https://cmp.signup.aesirx.io/.
  • Enter your details:
    • Email
    • Shield of Privacy ID
    • Domain
  • Accept Terms & Verify:
    • Check Accept Terms & Privacy Policy.
    • Click “Click to start verification → Activate My Trial.
  • Complete Setup:
    • Click How to get your Shield of Privacy & License.
    • Click Update Domain.

3. Update Your License for Continued Access

Before your trial ends, update your license to keep full access:

  • Go to the AesirX Licenses page.
  • Get your new license key.
  • Enter the key in the plugin settings under Your License Key.

Screenshot_2025-02-06_at_09.31.42.png

Step 3: Use AesirX Privacy Scanner to Identify Third-Party Domains in Google Analytics

With AesirX CMP installed, the next step is to identify and block Google Analytics third-party domains. AesirX Privacy Scanner simplifies this process.

1. Scan Your Site for Third-Party Domains:

  • Open AesirX Privacy Scanner.
  • Enter your website’s URL and click Scan.
  • The scanner will analyze your site and list all third-party domains collecting user data.

Screenshot_2025-02-06_at_09.32.07.png

2. Identify Google Analytics Tracking Domains:

Look for Google Analytics-related domains in the scan results, such as:

  • google-analytics.com
  • googletagmanager.com
  • gtag.js
  • analytics.js

3. Copy Identified Domains:

  • Copy these domains—you’ll use them in AesirX Consent Shield to block Google Analytics tracking until users give consent.

How_to_Add_Google_Analytics_Graphic_3.png

Step 4: Prevent Google Analytics Tracking Until Users Consent with AesirX Consent Shield

Stop Google Analytics from tracking users before they consent by configuring AesirX Consent Shield.

1. Block Third-Party Domains:

  • Go to WordPress > Settings > AesirX Consent Management.
  • Find AesirX Consent Shield for Domain/Path-Based Blocking.
  • Paste the copied Google Analytics domains to prevent them from loading before consent (e.g., google-analytics.com, googletagmanager.com).

2. Block the Google Analytics Plugin:

  • AesirX Consent Shield automatically detects and lists third-party plugins that collect user data.
  • Go to AesirX Consent Shield for Third-Party Plugins.
  • Find Google Analytics in the list and check the box to block it until users consent.

3. Adjust Script Blocking Settings:

  • Select "Only Third-Party Hosts" (default).
  • This blocks third-party scripts while keeping first-party scripts running normally.

4. Save your changes.

Click Save settings to apply the changes. Google Analytics tracking scripts and third-party domains will now remain blocked until users provide explicit consent.

Screenshot_2025-02-03_at_16.36.19.png

Step 5: Set Up Explicit and Fully Informed Consent

AesirX enhances Google Consent Mode V2 with two improved compliance-focused consent modes:

  • Simple Consent Mode – Works like Google’s Basic Consent Mode but with stricter compliance. No data is collected or shared with third parties until users explicitly consent. Includes Reject and Consent options.
  • Default Template – Tags start with denied parameters, ensuring no data is collected, stored, or sent until consent is given. Unlike Google Consent Mode 2.0, AesirX prevents any tags from loading before consent, reducing compliance risks. Includes Reject, Consent, and Decentralized Consent, giving users full control over their personal data.

How to Update Consent Settings

  1. Go to Settings > AesirX Consent Management > Select Consent Mode.
  2. Choose a template and customize the consent text.
    • Update your privacy policy to explicitly state:
      • Who collects the data (your site or third-party services).
      • Why the data is collected (e.g., analytics, personalization).
      • What data is collected (cookies, form data).
    • Keep the consent message simple, clear, and informative so users understand what they’re agreeing to and why it matters.
  3.  Enter your Google Tag ID and Google Tag Manager ID.
  4. Click “Save Settings” to apply changes.

Screenshot_2025-02-04_at_09.08.43.png

You’ve now set up Google Analytics for GDPR, the ePrivacy Directive, and other data protection laws using AesirX CMP. Google Analytics tracking scripts and third-party domains will remain blocked until users provide explicit consent, keeping your site fully compliant.

Take control of your site's privacy today—activate your 14-day free trial to access seamless consent management, customizable consent modes, and the unique Consent Shield for enhanced protection.

Not sure if your site meets compliance standards? Test it now with AesirX Privacy Scanner to check if your data protection measures meet legal requirements!

Enjoyed this read? Share the blog!