How TagNexus implemented Google Tag Gateway, reverse proxy, Server-Side GTM, Consent Mode v2, Meta CAPI, and multi-event Google Ads conversion tracking for Focused Clinic - delivering accurate, privacy-compliant analytics at enterprise scale.
Focused Clinic
Healthcare
Ongoing
GA4 · sGTM · GTG
Consent Mode v2
Executive Summary
Focused Clinic operates a modern digital healthcare platform spanning consultation journeys, lead generation experiences, and multi-channel marketing acquisition. As the platform matured, two things became clear: the existing client-side analytics setup was losing significant data to browser restrictions and ad blockers, and the marketing attribution across Google Ads and Meta was incomplete and unreliable.
TagNexus designed and implemented a complete server-side analytics infrastructure - starting from a structured dataLayer architecture, through Google Tag Gateway and reverse proxy for first-party data collection, to Server-Side GTM with Meta CAPI and Google Ads Enhanced Conversions. Consent Mode v2 was implemented throughout, ensuring every tracking decision respected user privacy.
The result was a measurement framework that collected more complete data, sent more reliable signals to ad platforms, and did all of it within a fully compliant consent architecture - giving Focused Clinic's marketing team data they could actually trust to make decisions from.
The Challenge
Each challenge was interconnected - improving data collection without fixing consent compliance would have created a better measurement setup with a worse legal position. We had to solve all of them together.
Safari ITP, Firefox ETP, and ad blockers were collectively stripping a meaningful portion of Focused Clinic's analytics data - particularly on mobile, where healthcare content is most frequently consumed. Client-side measurement alone could not be relied upon for marketing decisions.
The existing consent setup was not fully aligned with Consent Mode v2 requirements - tags were not correctly respecting consent signals in all states, creating both a compliance risk and a data quality issue. Non-consenting users were either being tracked when they should not have been, or producing no measurement data at all.
Only a single conversion action was being tracked in Google Ads, giving the algorithm a very limited signal to optimise against. Multiple meaningful user interactions - consultation requests, form completions, phone click events - were not being captured as conversion signals, limiting campaign performance.
Meta's client-side pixel was subject to the same browser restrictions affecting GA4 - conversion events were incomplete, match quality was low, and the algorithm was making optimisation decisions based on a fraction of actual conversion activity. This was directly impacting cost per acquisition.
Focused Clinic is a Single Page Application where the subdomain changes when users move from the marketing site into the consultation or onboarding flow. This breaks standard analytics tracking assumptions — pageviews do not fire on route changes, consent state does not automatically persist across subdomain boundaries, and cross-domain user identification requires deliberate configuration to avoid creating fragmented sessions and inaccurate user counts.
All tracking was running through third-party domains - googletagmanager.com, google-analytics.com, connect.facebook.net - all of which are common targets for ad blockers and browser privacy filters. There was no first-party data collection layer in place.
The existing GTM container relied heavily on built-in auto-event triggers rather than a structured dataLayer - making it fragile to website changes, inconsistent across different page types, and difficult to extend as new features were released.
The Solution
We approached this as a full infrastructure rebuild - not a series of isolated fixes. Every layer was designed to work together, from consent management through to server-side ad platform integration.
The first step was establishing a first-party data collection layer through reverse proxy configuration. GTM scripts and analytics requests that previously went directly to Google's domains were rerouted through Focused Clinic's own domain - making them indistinguishable from first-party requests and invisible to ad blockers and browser privacy filters.
This single change immediately improved data collection completeness before any other changes were made - it is the foundation on which everything else was built.
Google Tag Gateway was configured alongside the reverse proxy to serve GTM container scripts through Focused Clinic's first-party domain. This ensured that even users with aggressive ad blockers or privacy extensions received the GTM container correctly - dramatically improving the reliability of client-side tag firing before data even reached the server.
GTG and reverse proxy together form the first-party collection layer - one handles script serving, the other handles data transmission. Both are necessary for complete first-party coverage.
Focused Clinic operates under GDPR for its European user base, making consent compliance a strict requirement. We implemented Consent Mode v2 Basic — no analytics or ad platform tags fire until the user explicitly grants consent through the CMP. This is the appropriate approach for a healthcare provider where the sensitivity of user data makes any pre-consent data collection unacceptable.
The implementation involved solving a technically significant challenge: a consent initialisation race condition where the Google tag on the Consent Initialisation - All Pages trigger was attempting to fire at the same moment OneTrust was updating the consent state — meaning the consent status had not yet propagated when the tag evaluated it. The fix was adding an explicit analytics_storage consent requirement directly on the Google tag itself, ensuring it only fires after the consent state has been confirmed as granted by the user.
This fix also resolved a critical reporting issue: when users declined consent, GA4 was appending _gl parameters to browser URLs — creating duplicate URL variants such as /page and /page?_gl=xxxxx appearing as separate pages in GA4. This made path analysis and content reporting completely unusable. By ensuring the Google tag only fires post-consent, _gl parameters are never appended for non-consenting users, keeping URLs clean and GA4 reports accurate.
The server-side infrastructure was built on Addingwell — a managed server-side tagging platform that significantly simplifies sGTM deployment and ongoing management. Using Addingwell meant the server container was production-ready quickly, with reliable uptime and without the overhead of managing Google Cloud infrastructure directly. A Server-Side GTM container was then configured within Addingwell, with custom clients configured to receive data from the client-side container and route it to each destination - GA4, Meta, and Google Ads - independently. This meant that even if one destination had an issue, data continued flowing to the others.
Moving tag execution to the server removed the dependency on the user's browser for data delivery - events were captured client-side and delivered server-side, eliminating the primary vector through which browser restrictions caused data loss.
Meta's Conversions API was integrated at the server-side GTM level - sending conversion events directly from the server to Meta's endpoint, bypassing client-side browser restrictions entirely. Event deduplication logic was implemented to ensure events reaching Meta via both the browser pixel and CAPI were matched and deduplicated correctly, preventing inflated conversion counts.
The improvement in event match quality was immediate - server-side events carry more reliable first-party signals than browser pixels subject to cookie restrictions, giving Meta's algorithm substantially better data to work with.
Rather than a single conversion action, we implemented multiple conversion events mapped to specific user interactions across the Focused Clinic journey - consultation request submissions, phone click events, service page engagement events, and form start events. Each was configured as a separate conversion action in Google Ads with appropriate conversion values and attribution windows.
Google Ads Enhanced Conversions was also implemented server-side - passing hashed first-party customer data alongside conversion events to improve attribution accuracy for users who interact across multiple devices, or who are identified in Google's logged-in user graph. This is particularly valuable for healthcare journeys where users frequently switch between mobile research and desktop booking.
The existing GTM container was rebuilt around a structured dataLayer architecture - replacing fragile auto-event triggers with clean dataLayer pushes for every tracked interaction. Custom dimensions were added to GA4 to capture healthcare-specific metrics, and the event taxonomy was documented in a Solution Design Reference for the development team.
The rebuilt container is significantly leaner than what it replaced - fewer tags, cleaner trigger logic, and complete documentation so any future change can be made confidently without risk of breaking existing tracking.
Implementation Timeline
Full GTM and GA4 audit, consent compliance review, dataLayer gap analysis, event taxonomy design, and SDR documentation.
Reverse proxy configuration, Google Tag Gateway setup, Consent Mode v2 implementation, and CMP integration with full validation across all consent states.
sGTM deployment on Cloud Run, GA4 server client, Meta CAPI integration, Google Ads Enhanced Conversions, and multi-event conversion setup.
Full QA across all consent states, event validation, launch, and ongoing support as new features are released.
Ongoing enterprise analytics partnership - initial infrastructure build followed by continuous support as the Focused Clinic platform evolves.
The Outcome
The combination of reverse proxy, GTG, sGTM, and proper consent implementation delivered improvements across every dimension of measurement quality.
Key Learnings
Every healthcare analytics engagement deepens our understanding of the intersection between measurement quality and privacy compliance.
Without first-party script serving via reverse proxy, every other server-side investment is undermined - users with aggressive blockers never fire the client-side tags that feed the server container in the first place. Reverse proxy comes first.
Modern ad platform algorithms - Google's and Meta's - perform significantly better with richer conversion signal inputs. A single macro conversion gives the algorithm almost nothing to work with at the top of the funnel. Multi-event conversion tracking changes this fundamentally.
Done correctly - with Consent Mode v2 Advanced and proper tag-level consent checks - you can be fully privacy-compliant and still have high-quality measurement through behavioural modelling. The two are not in opposition.
Running browser pixels and server-side APIs simultaneously without deduplication inflates conversion numbers and damages campaign optimisation. Getting deduplication right is as important as getting signals to the platform in the first place.