Skip to content

Docs · GTM

Consent default deny, cookieless beside GA4

Google Tag Manager can keep GA4 for ads and still load Cookie Free Analytics for pageviews after Reject. Consent Initialization sets Google storage to denied by default. /cf.js does not wait for that grant. Dual-run. No invented recovery percentage.

Consent Initialization

In Google Tag Manager, open Consent Initialization — All Pages (or add that trigger type). Set analytics and ad storage to denied by default before any Google tag runs. Your CMP later updates those signals when someone Accepts. That is Consent Mode for GA4 and Ads — not a cookieless count.

// Consent Initialization — before Google tags
gtag('consent', 'default', {
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  analytics_storage: 'denied',
  wait_for_update: 500
});

Keep that block if you still fire GA4. Cookie Free Analytics does not read analytics_storage. It has nothing to grant.

Load /cf.js beside GA4

  1. Create a Custom HTML tag (or a tag that injects an external script). Paste the Cookie Free Analytics snippet from the site — the same 1 KB /cf.js you would put in the theme.
  2. Trigger: All Pages. Do not wait for a consent Granted event for this tag. Reject must still fire the cookieless request.
  3. Leave the GA4 Configuration tag and Ads tags as they are. Dual-run. First-party is optional: path rewrite or a c. CNAME — see First-party.
  4. Publish. Wait seven UTC days. Compare pageviews, not Users. There is no published dual-run GA4 vs Cookie Free Analytics percentage table — do not invent a recovery %.
<!-- Custom HTML — All Pages; do not gate on consent -->
<script
  defer
  src="https://www.cookiefreeanalytics.com/cf.js"
  data-site="YOUR_PUBLIC_ID"
></script>

Prefer the exact snippet from your site settings if you already use a first-party host. WordPress and Shopify often skip GTM for this script and paste in the theme instead.

What this does not do

Not a Consent Mode replacement for Google Ads. Not session replay. Not Mixpanel-depth product analytics. Not legal advice. Keep GA4 when you need audiences. Keep us as the count of what actually loaded after Reject.

Questions

Do I need GTM for Cookie Free Analytics?
No. Most sites paste /cf.js in the theme or use the WordPress plugin. Use GTM when you already load GA4 / Google Ads there and want the cookieless script in the same container.
Should Consent Initialization stay default denied?
Yes for Google tags that need consent. Cookie Free Analytics does not set a cookie and does not wait for that signal — load it on All Pages (or Consent Initialization after the defaults) so Reject still counts. Keep Consent Mode for GA4 if your counsel and ads stack need it.
Will this replace GA4 in GTM?
No. Dual-run. Keep the GA4 Configuration / event tags for ads and audiences. Add a Custom HTML (or tag that injects /cf.js) for the unblocked pageview count. Compare pageviews after a week. We do not publish a dual-run percentage table.

What the script sends · Consent Mode · First-party · Observed hits vs modeled gaps.