• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero Blog

NameHero Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories

How To Avoid A Cookie Banner While Using Analytics

Bhagwad Park

Published on: April 18, 2022

Categories: Website Performance 1

I don’t know about you, but I’m sick of cookie consent banners. When I visit a page, I often don’t want to interact with it by clicking. It’s especially annoying if a consent banner gets in the way of consent. I don’t want to click “Yes” OR “No”. Just leave me be! Unfortunately, GDPR rules via the EU directive Directive 2009/136/EC mandate that websites collect consent even for mundane stuff like analytics. There’s no perfect solution, but here is how you can avoid cookie banners while using analytics and remain compliant with the law.

You have to Disable ALL Cookies (Not Just 3rd Party)

Much is made of Google Analytics 4 (GA4) and the cookieless future. It’s important to note that most of these articles talk about 3rd party cookies – namely, cookies that are set by a site other than the one you visit. GA4 still very much uses first-party cookies. It’s not a secret. These are the cookie variables it sets. You need consent banners for both third-party and first-party cookies.

So if you thought that using GA4 frees you from the legal requirements to use a cookie consent banner, think again!

Disabling Cookies on Google Universal Analytics (UA)

While it’s possible to disable cookies on UA by modifying the code, I suggest you delete it and use another solution. For example, on WordPress websites, you can use the Cookieless Privacy-Focused Google Analytics plugin. This plugin takes your Google identifier as a configuration setting and outputs the UA code on your website without allowing it to set cookies.

Sure, you lose functionality. But there’s no getting around that.  Google Analytics without first or third-party cookies isn’t going to distinguish between repeat visitors and first-time visitors.

Disabling Cookies on Microsoft Clarity

I’d recently written a review of Microsoft Clarity, where I considered it as a replacement for Google Analytics. While it’s useful, it has some ways to go. But you can opt-out of cookies entirely via the advanced settings as shown here:

Remove Cookies from Microsoft Clarity
Remove Cookies from Microsoft Clarity

This means that if you use Clarity with this setting turned off, you can do away with cookies banners entirely.

Cloudflare’s Web Analytics

Cloudflare’s Web Analytics is quickly becoming one of my favorite analytics tools. It’s not yet a substitute for GA, and doesn’t track events like clicks and scrolls, but who knows the future? The best part is that it’s completely cookieless and so you don’t have to show your users a cookie consent banner. Cloudflare also measures Core Web Vitals (CWV) in real-time. This is something that you don’t find on regular analytics software, so it’s really useful.

Plus the interface is very user-friendly. If I didn’t have to track events, I would use Cloudflare analytics over Google Analytics all the time.

Anonymize Google Analytics Data

I’ve come across a very interesting service that takes the data from Google Analytics, strips it of any code that sets cookies, anonymizes the data, and then sends it forward to Google Analytics. As a result, you get GA tracking without cookies, and with perfect anonymity from your users. The service is called Privera, and it’s an open-source project as of now. There’s no paid tier, but you can use it for 10,000 visits every month for free. It’s just a single line of code on your website that replaces the one you use for Google Analytics.

How this would work with Google Analytics 4, I don’t know. And so far, I haven’t found an easy way to remove cookies in GA4. But when I find a method, I’ll be sure to let you know!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Comments

  1. jessica elkins says

    December 30, 2022 at 10:34 am

    The Privera link no longer works and I am not able to find the service when searching. Do you know of any alternative tools that you can share?

    Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

Speed up your site: solving the WordPress slowdown

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • Website Performance
  • Web Hosting
  • Resellers
  • Website Development
  • Website Security
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Knowledgebase
  • Announcements
  • Affiliates
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 NameHero, LLC. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA