GA4 and consent mode
Connecting the platforms

GA4 and
consent mode

Analytics that only measures what a visitor actually consented to.

A GA4 and consent mode implementation for pharmaceutical websites: Google Analytics 4 configured with consent mode genuinely gating what is measured, rather than a standard implementation that collects regardless of the visitor’s choice.

The technology
What is included

What a GA4 and consent
mode implementation involves

What it involves

A default GA4 installation collects data regardless of consent unless consent mode is specifically and correctly configured. On a health-related site, where consent rates are typically lower than average, getting this wrong means measuring — and potentially exposing — data that should never have been collected.

What we deliver

GA4 configured with consent mode correctly gating collection, verification that declined consent genuinely stops data collection, event and conversion tracking appropriate to what remains measurable, and documentation for your DPO.

Implemented to your DPO's definition

We implement the technical configuration to whatever your data protection officer defines for consent, keeping the legal judgment exactly where it belongs with the people qualified to make it, while we handle getting GA4 and Consent Mode to reflect that definition correctly.

case studies

Clients we've worked with

Real projects for industrial and pharmaceutical companies.
GA4 track record
Track record

What our GA4 and consent
mode work has covered

The scope our GA4 and consent mode work has operated within.

+10
years building for regulated industries
+200
organisations have trusted Code
+1.500
documents migrated with their access permissions intact
+160
scientific papers in a single managed repository
GA4 by measurement need
Who needs it

What GA4 has to measure
differently by site type

What is worth measuring, and what remains measurable under consent, differs by site. GA4 and consent mode work starts there.

Implementation process
Four stages

How we implement GA4
and consent mode

Four stages. GA4 and consent mode is verified technically, not just declared in a policy.

CONSENT MAPPING
01
01

What consent status controls what data

We map exactly what data category should be gated by which consent choice, since GA4's consent mode has specific signal types that need correct mapping to your consent categories.

What we map

Your existing consent categories mapped directly against GA4's specific consent signals — analytics storage, ad storage, and the rest — since a generic mapping tends to miss the nuance. We define exactly what data is collected in each consent state, granted or denied, before any configuration happens.

Result

A precise, documented mapping between what your consent banner tells the visitor and what GA4 actually does behind the scenes, so the two are not quietly out of sync.

CONFIGURATION
02
02

Consent mode correctly implemented

We configure GA4 consent mode so a declined consent genuinely restricts data collection, rather than a superficial implementation that continues collecting regardless.

What we configure

GA4's consent mode signals configured to match the mapping already agreed, default consent state set correctly before any choice is made, and updated state behaviour that actually changes what is collected once a visitor declines, not a superficial toggle that keeps collecting regardless.

Result

A GA4 implementation that genuinely respects the consent choice made, verified rather than taken on faith, which is the difference between a defensible setup and one that only looks compliant in the banner.

MEASUREMENT PLAN
03
03

What remains measurable, and how it is used

We build event and conversion tracking appropriate to what remains measurable under real consent rates, avoiding tracking that implies more completeness than the data has.

What we build

Event and conversion tracking scoped to what remains reliably measurable once real consent rates are applied, not a plan built assuming full consent. Documentation of exactly what is and is not captured under each consent state, so anyone reading a report understands its limits.

Result

A measurement setup that is honest about its own coverage, so decisions made from the data account for what a declined-consent visitor's actions are not showing, rather than treating partial data as the whole picture.

VERIFICATION
04
04

Confirmed to actually gate correctly

We test that declining consent genuinely stops the relevant data collection, rather than assuming the configuration works as intended.

What we verify

Consent-gated behaviour tested directly in the browser under each consent state, confirming data collection actually stops when it should rather than trusting the configuration screen. Documentation prepared specifically for your DPO, evidencing how the setup behaves.

Result

Evidence, not an assumption, that the implementation does what it is supposed to — which is what your DPO needs on file, and what protects you if the setup is ever questioned in an audit.

GA4 and consent mode questions

What comes up when implementing consent-respecting analytics.

Does GA4 respect consent by default?

No, GA4 collects data regardless of consent unless Consent Mode is specifically and correctly configured. A default installation will fire tracking tags before a visitor makes any cookie choice, which is a common gap we find auditing unaudited sites. We configure Consent Mode so tags wait for the relevant consent signal, and verify that behaviour directly in the browser rather than assuming the setup is correct.

Why is our consent rate lower than expected?

Health-related sites typically see lower consent rates than general e-commerce, since visitors are more cautious about sharing behavioural data tied to a health topic. We treat that as a baseline to design around rather than a problem to fix – building Consent Mode’s modelled conversions and cookieless pings into the analytics setup so reporting stays useful even at a lower opt-in rate.

How does this relate to our broader consent implementation?

GA4 configuration is one part of a broader consent implementation, not a standalone setup. It has to align with the same consent categories and banner logic used across the rest of the site, including any other tracking or marketing tags. See GDPR and consent for the full technical audit and implementation this GA4 configuration typically sits within.

Can you provide legal advice on our consent requirements?

No, defining consent requirements sits with your data protection officer and legal counsel, not with us. We implement the technical configuration – cookie categories, banner behaviour, and tag gating – to whatever standard they define, and flag any technical limitation we find along the way. Any change to that legal requirement is passed to us for implementation, not the reverse.

Related technology we work with

Other technology we work with

GA4 and consent mode connects closely with these related technology pages.

GA4 and consent mode

Fix your GA4
and consent mode implementation

Analytics you are not confident actually respects visitor consent. Tell us what you have and we will tell you how we would approach GA4 and consent mode.

contact us
Contact Form

Tell us
about your project

Tell us about your organization’s context and the planned scope of the project.
CODE GxP, as the data controller, will process your data in order to respond to the query and/or request you submit through this contact form. Privacy Policy.
Our site uses cookies to collect information about your device and browsing activity. We use this data to improve the site, ensure security and deliver personalized content. You can manage your cookie preferences by clicking here.
Accept cookies Configure Decline cookies
Basic cookie information
This website uses cookies and/or similar technologies that store and retrieve information when you browse. In general, these technologies can serve very different purposes, such as, for example, recognizing you as a user, obtaining information about your browsing habits or personalizing the way in which the content is displayed. The specific uses we make of these technologies are described below. By default, all cookies are disabled, except for technical ones, which are necessary for the website to function. If you wish to obtain more information or exercise your data protection rights, you can consult our Cookie Policy".
Accept cookies Configure
Technical cookies needed Always active
Technical cookies are strictly necessary for our website to work and for you to navigate through it. These types of cookies are those that, for example, allow us to identify you, give you access to certain restricted parts of the page if necessary, or remember different options or services already selected by you, such as your privacy preferences. Therefore, they are activated by default, your authorization is not necessary.Through the configuration of your browser, you can block or alert the presence of this type of cookies, although such blocking will affect the proper functioning of the different functionalities of our website.
Analytics cookies
Analytics cookies are used to analyse website behaviour anonymously. They help us measure activity and improve the website.
Confirm preferences
Title
Popupcontent
Contact us
CODE GxP, as the data controller, will process your data in order to respond to the query and/or request you submit through this contact form. Privacy Policy.
Aceptar