<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sean Q</title>
    <description>The latest articles on DEV Community by Sean Q (@sean_gdprchecker).</description>
    <link>https://dev.to/sean_gdprchecker</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3999232%2Fd92ab3b0-d582-4204-beea-0398c59b9d18.png</url>
      <title>DEV Community: Sean Q</title>
      <link>https://dev.to/sean_gdprchecker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sean_gdprchecker"/>
    <language>en</language>
    <item>
      <title>How to Check If Google Analytics Fires Before Cookie Consent</title>
      <dc:creator>Sean Q</dc:creator>
      <pubDate>Tue, 23 Jun 2026 17:55:14 +0000</pubDate>
      <link>https://dev.to/sean_gdprchecker/how-to-check-if-google-analytics-fires-before-cookie-consent-4ig5</link>
      <guid>https://dev.to/sean_gdprchecker/how-to-check-if-google-analytics-fires-before-cookie-consent-4ig5</guid>
      <description>&lt;p&gt;Many websites have a cookie banner, but that does not always mean tracking is blocked before consent.&lt;/p&gt;

&lt;p&gt;One common issue is that Google Analytics, GA4, Google Tag Manager, Meta Pixel, or other marketing scripts load as soon as the page opens. The banner appears visually, but the tracking has already happened.&lt;/p&gt;

&lt;p&gt;That is a problem because consent is not just a design element. The technical behavior of the website matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you are checking
&lt;/h2&gt;

&lt;p&gt;You want to know whether analytics or marketing requests happen before the visitor clicks “Accept”.&lt;/p&gt;

&lt;p&gt;Common signals include requests to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;google-analytics.com&lt;/li&gt;
&lt;li&gt;googletagmanager.com&lt;/li&gt;
&lt;li&gt;doubleclick.net&lt;/li&gt;
&lt;li&gt;facebook.com/tr&lt;/li&gt;
&lt;li&gt;connect.facebook.net&lt;/li&gt;
&lt;li&gt;hotjar.com&lt;/li&gt;
&lt;li&gt;clarity.ms&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Manual test
&lt;/h2&gt;

&lt;p&gt;Open the website in a private browser window.&lt;/p&gt;

&lt;p&gt;Do not click the cookie banner.&lt;/p&gt;

&lt;p&gt;Open DevTools and go to the Network tab.&lt;/p&gt;

&lt;p&gt;Reload the page.&lt;/p&gt;

&lt;p&gt;Search for requests such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;collect&lt;/li&gt;
&lt;li&gt;gtag&lt;/li&gt;
&lt;li&gt;google-analytics&lt;/li&gt;
&lt;li&gt;googletagmanager&lt;/li&gt;
&lt;li&gt;doubleclick&lt;/li&gt;
&lt;li&gt;facebook&lt;/li&gt;
&lt;li&gt;fbevents&lt;/li&gt;
&lt;li&gt;hotjar&lt;/li&gt;
&lt;li&gt;clarity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If those requests appear before consent, the website may be tracking before the user has agreed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this happens
&lt;/h2&gt;

&lt;p&gt;This usually happens because analytics or marketing scripts are installed outside the consent manager.&lt;/p&gt;

&lt;p&gt;Common causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GA4 is installed directly in the page&lt;/li&gt;
&lt;li&gt;Google Tag Manager fires tags before consent checks&lt;/li&gt;
&lt;li&gt;Meta Pixel is not gated behind the CMP&lt;/li&gt;
&lt;li&gt;Chat widgets or heatmap tools load immediately&lt;/li&gt;
&lt;li&gt;The cookie banner records consent, but does not block scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What should happen instead
&lt;/h2&gt;

&lt;p&gt;Before consent, non-essential tracking should not fire.&lt;/p&gt;

&lt;p&gt;After consent, analytics and marketing tags can load according to the consent choices the user made.&lt;/p&gt;

&lt;p&gt;For Google tools, this often means configuring Consent Mode correctly and making sure tags respect consent states.&lt;/p&gt;

&lt;h2&gt;
  
  
  A cookie banner is not enough
&lt;/h2&gt;

&lt;p&gt;A banner can look compliant while the website still sends tracking requests too early.&lt;/p&gt;

&lt;p&gt;That is why it is worth testing the actual browser behavior, not just checking whether a banner appears.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated scanning
&lt;/h2&gt;

&lt;p&gt;I’m building GDPRChecker, a free GDPR scanner for websites that checks cookies, trackers, cookie banner signals, and pre-consent tracking behavior.&lt;/p&gt;

&lt;p&gt;You can try it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.gdprchecker.online/scanner" rel="noopener noreferrer"&gt;https://www.gdprchecker.online/scanner&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is not legal advice, but it can help identify technical consent issues that are easy to miss.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>webdev</category>
      <category>analytics</category>
      <category>cookie</category>
    </item>
  </channel>
</rss>
