Skip to content

Commit 58d7b11

Browse files
Rename 'Advertising Cookies' to 'Google Signals' in consent banner
The ad_storage/ad_user_data/ad_personalization signals are Google Consent Mode v2 modeling signals, not for serving ads. The previous label and description were factually wrong for a site that serves no advertisements.
1 parent c3037ce commit 58d7b11

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

EssentialCSharp.Web/wwwroot/js/consent-manager.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ConsentManager {
2525
init() {
2626
this.initGoogleConsentMode();
2727

28-
// Load saved consent preferences (signals Clarity/GA if already consented)
28+
// Load saved consent preferences (signals GA if already consented)
2929
this.loadConsentPreferences();
3030

3131
// Always send Clarity the current consent state (denied by default for new visitors).
@@ -36,18 +36,6 @@ class ConsentManager {
3636
if (this.shouldShowConsentBanner()) {
3737
this.showConsentBanner();
3838
}
39-
40-
// Dispatch initialization event for other scripts to listen to
41-
this.dispatchInitializationEvent();
42-
}
43-
44-
dispatchInitializationEvent() {
45-
document.dispatchEvent(new CustomEvent('consentManagerReady', {
46-
detail: {
47-
hasAnalyticsConsent: this.hasAnalyticsConsent(),
48-
hasAdvertisingConsent: this.hasAdvertisingConsent()
49-
}
50-
}));
5139
}
5240

5341
initGoogleConsentMode() {
@@ -155,8 +143,8 @@ class ConsentManager {
155143
<input type="checkbox" id="consent-advertising">
156144
<span class="consent-slider"></span>
157145
<div class="consent-info">
158-
<strong>Advertising Cookies</strong>
159-
<p>Used to deliver relevant advertisements and measure their effectiveness.</p>
146+
<strong>Google Signals</strong>
147+
<p>Consent signals passed to Google to support analytics modeling and measurement. No advertisements are served on this site.</p>
160148
</div>
161149
</label>
162150
</div>
@@ -458,7 +446,7 @@ class ConsentManager {
458446
// This handles multi-part TLDs (e.g. .co.uk) by trying all suffixes.
459447
const parts = hostname.split('.');
460448
const domains = [hostname];
461-
for (let i = 1; i < parts.length - 1; i++) {
449+
for (let i = 0; i < parts.length - 1; i++) {
462450
domains.push('.' + parts.slice(i).join('.'));
463451
}
464452
trackingCookies.forEach(cookieName => {

0 commit comments

Comments
 (0)