Knowledge base

GA4

GA4 Consent Mode setup and testing

Connect analytics consent to GA4, test page_view under different choices and interpret the GA4 consent settings screen correctly.

Editorial illustration for GA4 Consent Mode setup and testing
Editorial illustration by Consentory.

In brief

A GA4 property status alone does not prove the first page view obeyed consent; test the browser event sequence.

Inventory the GA4 installation

Identify your GA4 measurement ID and whether GA4 loads through GTM, direct gtag.js or both. Find the initial page_view, enhanced measurement and custom events. Duplicated installers can make a clean consent test look inconsistent.

Set analytics_storage

Set a denied default before GA4 loads or is evaluated. On the banner's Analytics choice, update analytics_storage to granted or denied. Keep advertising signals separate; granting Analytics is not permission for Ads personalization.

If your required behavior is no GA4 request before permission, implement Basic mode with actual blocking. A denied analytics_storage value in Advanced mode can still produce cookieless signals.

Use the Tag Assistant debugging workflow to compare the consent state with the event that actually fired.

Test four visitor journeys

Use the matrix below as a manual test plan. For each row, inspect Tag Assistant's Consent tab, GA4-related Network requests and browser storage. Capture the first page view and an event after the choice.

  • Fresh and undecided
  • Analytics accepted, advertising rejected
  • Reject all
  • Change from accepted to rejected

Check GA4 administration

In GA4, review Admin → Data collection and modification → Consent settings for diagnostic status. Google's reporting may take 48–72 hours to reflect a corrected implementation, so use Tag Assistant and browser traces for immediate verification.

Investigate gaps and duplicates

If page_view appears twice, inspect automatic and manual page views, GTM and direct gtag installations, and route changes. If no event appears after grant, check whether a blocked tag is retriggered on consent update or only on the next navigation.

Try it

GA4 scenario test matrix

Expected signals: analytics_storage = denied

Verify: Check the earliest consent event and whether GA4 requests match your Basic or Advanced mode.

Continue with a related guide

Primary sources

Reviewed 15 October 2026. Validate product interfaces and requirements for your own implementation.

Check the implementation on your site

Consentory helps teams inspect trackers, configure prior blocking and document consent choices. The guides above give you a test plan before rollout.