/.well-known/gpc.json Generator & Sec-GPC: 1 HTTP Header Handler Guide
Publish a compliant /.well-known/gpc.json support resource and honor Sec-GPC: 1 HTTP headers plus navigator.globalPrivacyControl for CCPA/CPRA opt-out of sale/sharing.
Generate a strictly ordered Google Consent Mode v2 default-denied block covering ad_storage, analytics_storage, ad_user_data, and ad_personalization with ads_data_redaction and 500ms wait_for_update.
<!-- Place BEFORE GTM / gtag.js / analytics tags on https://acme.example.com -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500,
'region': ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IS','IE','IT','LV','LI','LT','LU','MT','NL','NO','PL','PT','RO','SK','SI','ES','SE','GB','CH']
});
gtag('set', 'ads_data_redaction', true);
gtag('set', 'url_passthrough', false);
// CCPA/CPRA Global Privacy Control (GPC) auto-suppression
if (navigator.globalPrivacyControl === true) {
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied'
});
}
</script>
Run a live pre-consent cookie, tracker, gtag('consent', 'default') & /.well-known/gpc.json audit on ConsentCheck (consent.runglab.dev), or grab the turnkey $39 ConsentCheck Compliance Pack on Creem. Need a PayPal invoice? Email [email protected].
| Control / Signal | Compliant Baseline | Engineering & Privacy Rationale |
|---|---|---|
ad_storage |
'denied' (default) |
Blocks Google Ads conversion & remarketing cookies until affirmative marketing opt-in |
analytics_storage |
'denied' (default) |
Prevents setting _ga / _gid identifiers pre-consent under GDPR & ePrivacy Art. 5(3) |
ad_user_data |
'denied' (default) |
Consent Mode v2 signal governing sending consented user data to Google advertising endpoints |
ad_personalization |
'denied' (default) |
Consent Mode v2 signal controlling personalized remarketing audience eligibility |
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500,
'region': ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IS','IE','IT','LV','LI','LT','LU','MT','NL','NO','PL','PT','RO','SK','SI','ES','SE','GB','CH']
});
gtag('set', 'ads_data_redaction', true);
</script>
export function applyCmpConsentChoice({ analytics, marketing }) {
window.gtag?.("consent", "update", {
analytics_storage: analytics ? "granted" : "denied",
ad_storage: marketing ? "granted" : "denied",
ad_user_data: marketing ? "granted" : "denied",
ad_personalization: marketing ? "granted" : "denied"
});
}
Publish a compliant /.well-known/gpc.json support resource and honor Sec-GPC: 1 HTTP headers plus navigator.globalPrivacyControl for CCPA/CPRA opt-out of sale/sharing.
Generate an honest, developer-ready pre-consent Cookie Policy Markdown notice covering Strictly Necessary, Analytics, Marketing, Consent Mode v2 defaults, and GPC opt-outs.
Inspect Google Analytics 4 Consent Mode v2 runtime signals (`gcs`, `gcd`), cookieless ping behavior, and `ads_data_redaction` to confirm zero `_ga` cookies drop before opt-in.
Stop Meta Pixel from setting `_fbp` cookies or firing `tr/` network beacons before user consent using `fbq('consent', 'revoke')` or strict GTM/script deferral.
Configure GTM Consent Overview, Consent Initialization triggers, and custom HTML/pixel tag consent checks so zero marketing tags fire before Consent Mode v2 grants permission.
Prevent HubSpot (`hubspotutk`, `__hstc`) and Intercom (`intercom-id-*`) from dropping marketing or tracking cookies before user consent using `_hsq` suppression and conditional widget loading.
← Back to GDPR & Consent Mode v2 Hub · ConsentCheck Live Audit → · $39 Compliance Pack → · Cluster 4: Security Headers → · Cluster 11: PCI & SRI →
It must run immediately in `<head>` BEFORE the GTM `<script>` snippet so GTM reads the denied defaults before evaluating its All Pages triggers.
It instructs Google tags to pause up to 500 milliseconds on page load while an asynchronous CMP loads a returning visitor's previously saved consent choice.
Run a live headless browser + cookie audit on https://consent.runglab.dev/?ref=tool-consent-cluster to verify pre-consent cookies and Consent Mode signals.