You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Comprehensive overhaul of the cookie consent manager to fix GDPR
compliance issues, bugs, and a broken Google Analytics integration.
## Changes
### Strategy change
- **Show consent banner to all visitors** — removes unreliable
timezone-based region detection (VPN bypass gaps, missing timezones,
ongoing maintenance burden). One-time banner click for non-EEA users is
a worthwhile tradeoff for zero compliance liability.
### Bug fixes
- **Clarity denied signal for new visitors** — `updateClarityConsent()`
was never called for first-time visitors (only on returning visitors and
after interaction). Now called unconditionally in `init()` so Clarity
always receives the current consent state on page load.
- **`personalization_storage` mis-grouped** — was bound to
`analyticsChecked` in `saveCustomPreferences()`, should be
`advertisingChecked`.
- **`gtag('config')` firing twice** — removed duplicate call; now fires
unconditionally once per Google Consent Mode v2 "Advanced" pattern (GA
handles denied state with cookieless modeled pings).
- **Duplicate `gtag('consent', 'default')`** — removed from
`initGoogleConsentMode()`; `_Layout.cshtml` is the single owner
(required to fire before `gtag.js` loads).
- **`clearTrackingCookies()` didn't clear domain-scoped cookies** — now
deletes on exact hostname, root domain, and no-domain for full
GA/Clarity cookie coverage.
- **`revokeAllConsent()` called conflicting Clarity v1 API** — removed
`clarity('consent', false)`; `consentv2` handles it.
### Improvements
- **`wait_for_update: 500`** added to `gtag('consent', 'default')` —
prevents GA from firing pings before the consent banner has a chance to
render.
- **`CONSENT_VERSION = '2'`** — bumping this constant re-prompts all
existing users. Stale cookies are invalidated on load.
- **`_timestamp` + `_version` stored in consent cookie** — GDPR Art.
7(1) audit trail.
- **`Secure` flag** on consent cookie (HTTPS only).
- **Privacy policy link** added to consent banner text.
- **`functionality_storage`/`security_storage` protected** — can no
longer be overridden via cookie tampering.
- **`openConsentPreferences()` setTimeout removed** — direct synchronous
call.
## Testing
Use `?testConsent=true` to force the banner regardless of existing
consent cookie.
// Show to all visitors who haven't given valid consent yet
90
+
return!this.getCookie(this.COOKIE_NAME);
137
91
}
138
92
139
93
showConsentBanner(){
@@ -154,7 +108,7 @@ class ConsentManager {
154
108
<div class="consent-banner-content">
155
109
<div class="consent-banner-text">
156
110
<h3>Cookie Preferences</h3>
157
-
<p>We use cookies to improve your experience and analyze website usage. You can manage your preferences below.</p>
111
+
<p>We use cookies to improve your experience and analyze website usage. See our <a href="https://intellitect.com/about/privacy-policy/" target="_blank" rel="noopener noreferrer">Privacy Policy</a> for details.</p>
<p>Used to deliver relevant advertisements and measure their effectiveness.</p>
145
+
<strong>Google Signals</strong>
146
+
<p>Allows Google to associate your visit with your Google account for analytics modeling and cross-site measurement. No advertisements are served on this site, but Google may use this data across its services.</p>
0 commit comments