How to add cookieless tracking with WP and GA.

If you are using Google Analytics 4 (GA4) or Google Ads via GTM, you can achieve cookieless tracking using Google Consent Mode v2. [1]

When a user rejects cookies on your WordPress site, Consent Mode instructs your GA4/Google Ads tags to alter their behavior. Instead of storing identifiers in cookies, GTM sends cookieless pings to Google’s servers. These pings still track basic signals (like page views and conversions) without violating privacy regulations. [1, 2]

  • How to set it up on WordPress:
    1. Install a Google-certified Consent Management Platform (CMP) plugin on WordPress, such as CookieYes or Complianz.
    2. In your CMP settings, enable Google Consent Mode v2.
    3. Inside Google Tag Manager, import the CMP’s official template from the Community Template Gallery and map your firing triggers to “Consent Initialization – All Pages”. [1, 2, 3, 4, 5, 6]

Option 2: The Server-Side Tracking Approach

Another way to control cookieless tracking through GTM is by transitioning from client-side tracking to Server-Side Google Tag Manager (sGTM).

Instead of tags firing directly in the user’s browser, data is sent to a cloud server you control. From that server, you can strip away all third-party cookies, anonymize IP addresses, remove personal identifiers, and then pass clean data to your analytics platforms.

Option 3: Third-Party Privacy Tools via GTM

If your goal is a 100% cookieless environment where you never have to display an annoying cookie banner for basic statistics, you can route a privacy-first analytics tool through your GTM container. [1]

Platforms like Matomo (configured in cookieless mode), Plausible, or Fathom can easily be deployed via GTM using a Custom HTML tag or community templates. Because these platforms don’t collect personal data or store cookies by design, they provide compliant cookieless tracking right out of the box. [1, 2]

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts