One Shared Memory for Four AI Agents
736 sessions and 28 shared memories in one versioned vault
Read case studyI built a tracking setup for a German dental practice that measures bookings and inquiries without sending any health-related data to Google, and documented it for the practice's data protection review.
A German digital marketing agency, working for a dental practice in Hamburg. The agency runs the practice’s website and Google Ads, and brought me in to set up conversion tracking and cookie consent on the practice’s WordPress site.
Dental practices in Germany handle health data, so the agency set strict rules up front: no tracking before consent, nothing that could reveal a treatment or condition, and no remarketing or personal data in Google Ads.
The site had tracking tools installed, but they weren’t compliant and weren’t measuring what the practice needed.
/zahnimplantat-hamburg/ tells Google that a specific person is interested in dental implants, which can count as health data under Art. 9 GDPR.Consent comes first in this setup, and every piece of data is cleaned in the browser before it reaches Google.
Consent before anything loads
I fixed the Cookiebot domain authorization so the banner appears, and loaded Google Tag Manager through a single WordPress snippet that Cookiebot blocks until the visitor accepts statistics. Without consent, the browser sends no request to Google at all. I removed the duplicate tag loading from Site Kit and Cookiebot, so GTM now loads from one place only.
URL, title, and referrer sanitization
I wrote three GTM variables that rewrite what GA4 receives. They work from an allowlist: only pages like the homepage, team, or contact page keep their real path, every individual treatment page becomes /treatment/ with the title “Behandlung”, and any unknown page becomes /other/. Referrers are cut down to the domain, and only the URL parameters needed for ad attribution (gclid, gbraid, wbraid, basic UTMs) survive. Pages the practice adds later are generalized automatically.
Generic events only
There are three events with neutral names: appointment_click, contact_form_success, and facebook_click. A text-based rule keeps the emergency link out of bookings, including clicks on its icon, and the form event fires only when the success message appears, so failed submissions don’t count.
Locked-down GA4
Google signals, granular location data, and ads personalization are off, data retention is 2 months, and Enhanced Measurement is reduced to page views and scrolls. Site search, outbound clicks, and form interactions are disabled.
Google Ads without personal data
I didn’t put an Ads tag on the site. I linked GA4 to Google Ads and imported the two key events as conversions, so Ads only receives the already-sanitized data, with no Enhanced Conversions, remarketing, or audiences. I also disabled Jetpack Stats, which sent visitor data to the US.
Documentation for the data protection review
I wrote a German-language document covering every tag, trigger, consent category, event parameter, suppressed field, data transfer, and retention setting, so the practice’s data protection officer could approve the setup before go-live.
Everything runs on the practice’s existing WordPress site; no new hosting or paid tools were added.
| Layer | Tool | Role |
|---|---|---|
| Website | WordPress (Gutenverse) | Practice website |
| Consent | Cookiebot, Google Consent Mode V2 (basic) | Banner, consent storage, blocking scripts until opt-in |
| Tag loading | WPCode | Loads GTM site-wide, blocked by Cookiebot until opt-in |
| Tag management | Google Tag Manager | All tags, triggers, and custom JavaScript variables |
| Analytics | Google Analytics 4 | Page views, scrolls, and three generic events |
| Advertising | Google Ads | Two conversions imported from GA4 |
| Reporting | Google Site Kit | Dashboard in WordPress only, no tracking code |
| Testing | GTM Preview, Tag Assistant, GA4 DebugView, browser DevTools | Verifying consent states and every outgoing value |
The practice now measures bookings and inquiries in GA4 and Google Ads, no treatment or health detail leaves the browser, and the agency has a setup its data protection officer could review line by line.
| Before | After |
|---|---|
| Cookie banner shown to 0% of visitors | Banner shown to every visitor, with a reject option |
| GTM loaded from 2 sources besides the intended one | 1 source, loaded only after consent |
| 9 treatment pages sent to Google under their real URLs | All 9 sent as one generic /treatment/ path |
| Search terms and outbound link URLs collected automatically | 0 search terms or link URLs sent |
| Emergency clicks would count as bookings | 0 emergency clicks in booking conversions |
| Form counted every submit attempt | Only successful submissions counted |
| No conversions in Google Ads | 2 conversions, with no Enhanced Conversions, remarketing, or audiences |
The agency’s feedback on delivery: “Great, thank you so much.”
If your tracking has to hold up to a data protection review, hire me.
“Sultan built the consent and tracking setup for our dental client with real care. He was cautious at every step, made sure everything followed the rules and the GDPR, and thought ahead about what the practice's data protection officer would check.”
Tag management, data layers, and Consent Mode V2 that fire once, with consent, and Google Ads can bid on.
736 sessions and 28 shared memories in one versioned vault
Read case studySales documents and the books in one system
Read case studyAbout 30 hacked sites cleaned, locked, and watched daily
Read case studySending stopped on its own, every site on a new key
Read case studyProducts and articles published without a deploy
Read case studyThe company's main hiring platform, built in-house
Read case studyFive chat channels in one inbox on every phone
Read case studyConsent to conversion, end to end, in 2 days
Read case study8+ issues fixed in 2 days, every conversion verified
Read case studyOne event standard across every data flow
Read case studyNext step
See how I work and what it costs, or email me. I usually reply within one working day.