Summary
- A dataLayer is the list of facts your website hands to Google Tag Manager and other tags. If you design it well, it becomes the one place where you decide what leaves your site.
- For clinics, the rule is simple: measure that someone enquired or booked, never why. Use generic event names, no health or contact details, and no condition-revealing page addresses.
- Advertising tags should receive the minimum they need to count a conversion, and only after the visitor has agreed.
- This approach keeps campaign reporting working while removing the data the OAIC’s decisions focus on.
Clinics have good reasons to measure marketing. You want to know which campaigns bring in new patients and which are wasted spend. The problem is not measurement itself. It is measurement that sends the reason for a visit, or the details of a booking, to an advertising platform. This guide is written for practice managers and the developers or agencies who set up their tracking. The concepts come first and the code comes after.
What a dataLayer is
Google describes the data layer as an object used by Google Tag Manager and the Google tag to pass information to tags. Events or variables are pushed into it, and tags can be triggered based on them1. A booking form, for example, can push an event called booking_complete when it succeeds. Tag Manager listens for that event and fires whichever tags you have connected to it.
Without a planned dataLayer, tags tend to scrape whatever is on the page: the full address, the page title, button text, sometimes form fields. With one, your site decides exactly what each tag is allowed to know.
Five principles for clinics
1. Generic event names
Name events after the action, not the service. booking_start, booking_complete, enquiry_submit and phone_click tell you everything a campaign report needs. book_ivf_consult or anxiety_form_submit tell the receiving platform about the patient.
2. No health, identity or contact details in parameters
Event parameters should never contain condition names, treatment names, appointment types, practitioner specialties, names, email addresses or phone numbers. Google requires that no personally identifiable information be sent to Google Analytics, including in event values, custom dimensions and campaign parameters2. For advertising tags, the OAIC’s guidance reminds organisations to collect only the information they need3.
3. Clean page addresses
The page address is the hardest leak to spot, because almost every tag sends it by default. Google notes that the basic Analytics tag collects the page address and title of every page, and that both the path and any parameters must be free of personal information2. GA4 offers data redaction that removes email addresses on a best-effort basis and strips query parameters you specify2. That feature is designed for email addresses and query parameters, so a path such as /conditions/endometriosis still needs handling in your tag setup. For advertising tags, configure them to send a generic page value, such as your domain or a broad page group, instead of the real address.
4. Consent first
Advertising tags should only fire once the visitor has agreed. Google’s Consent Mode documentation is clear that the site owner must obtain consent and make sure both Google and third-party tags respect it4. In Tag Manager, that means consent checks on every advertising tag, and default-denied states set before any tag runs.
5. Separate analytics from advertising
Your own analytics can tell you which pages are popular, in aggregate, inside a tool you control. Advertising platforms need far less: usually just a signal that a conversion happened and which ad led to it. Don’t send ad platforms the same rich data you send analytics.
What good and bad look like
A booking confirmation that leaks:
// Avoid: reveals the service, the practitioner and the patient
dataLayer.push({
event: 'Book Anxiety Consult',
service: 'Anxiety and panic treatment',
practitioner: 'Clinical psychologist, Parramatta',
patient_email: 'jane@example.com'
});
The same moment, measured safely:
// Better: records that a booking happened, nothing about why
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'booking_complete',
booking_channel: 'online', // online | phone
page_group: 'booking' // a broad group, never the real path
});
Google recommends declaring the data layer once, high on the page, before the Tag Manager snippet, and adding to it with dataLayer.push() rather than overwriting it1.
| Keep | Avoid |
|---|---|
| Generic events: booking_start, booking_complete, enquiry_submit, phone_click | Events named after a service, condition or treatment |
| Broad page groups: home, about, service, booking, contact | Full page paths or titles that name a condition |
| Booking channel (online or phone), clinic location code | Appointment type, practitioner specialty, appointment date |
| Campaign source and medium for your own analytics | Names, email addresses, phone numbers, hashed or not |
| Consent state, set before tags run | Tags with no consent check |
Measuring bookings on another platform
Many clinics take bookings through a third-party platform. Its own tracking options may add parameters you didn’t choose. HealthEngine’s GA4 setup guide, for example, lists booking events whose parameters include specialty, appointment type and appointment date5. Cliniko’s guides track a completed booking by watching for a confirmation page address67. If you use these integrations, keep the detailed parameters inside your own analytics and send advertising platforms only a generic conversion. Our booking platforms guide goes further.
Reporting without health data
With this setup, you can still answer the questions that matter commercially: how many bookings each campaign produced, the cost per booking, and which locations are growing. What you give up is the ability to target ads based on the conditions people read about. Under Google’s own policy, advertisers already cannot use remarketing lists or Customer Match for health-related personalised advertising8, so for many clinics that capability was limited anyway.
Akesis’s Guard + Insights plan includes designing and implementing this kind of setup: a privacy-safe dataLayer, Google Analytics 4 and Google Ads with Consent Mode, booking conversion tracking, and weekly checks that nothing has drifted. See pricing.
Implementation checklist
- Write a one-page tracking plan: each event, when it fires, its parameters, and which tags receive it.
- Rename events so none mention a service, condition, treatment or practitioner.
- Remove every parameter that could carry health, identity or contact details.
- Replace real page addresses with broad page groups for all advertising tags.
- Turn on GA4 data redaction for email addresses and any query parameters you don’t need.
- Set default consent to denied before any tag runs, and add consent checks to every advertising tag.
- Test with the browser’s Network tab and Tag Manager preview mode before publishing.
- Re-check after every website change, new campaign or new booking integration.
See what your own website shares
The free Akesis scan checks your homepage for advertising and analytics tags, whether they fire before consent, and what they receive. It takes about a minute and needs no install.
Run a free scanSources
- Google for Developers, The data layer. developers.google.com/tag-platform/tag-manager/datalayer
- Google Analytics Help, Best practices to avoid sending Personally Identifiable Information (PII). support.google.com/analytics/answer/6366371
- OAIC, Tracking pixels and privacy obligations, 4 November 2024. www.oaic.gov.au/privacy/privacy-guidance-for-organisations-and-government-agencies/organisations/tracking-pixels-and-privacy-obligations
- Google for Developers, Consent mode overview. developers.google.com/tag-platform/security/concepts/consent-mode
- HealthEngine Help Centre, Google Analytics 4 (GA4): Setup on a Practice Web-Plugin. support.healthengine.com.au/en-au/help-centre-practice/google-analytics-4-ga4-setup-on-a-practice-web-plugin
- Cliniko Help, Track conversion events with Google Analytics 4. help.cliniko.com/en/articles/5948302-track-conversion-events-with-google-analytics-4
- Cliniko Help, Connect Meta Pixel with online bookings. help.cliniko.com/en/articles/3471492-connect-meta-pixel-with-online-bookings
- Google Ads Help, Health in personalized advertising. support.google.com/adspolicy/answer/16701855
Sources were checked on 27 October 2026. Links to third-party sites are provided for reference; Akesis is not affiliated with the organisations listed.