Skip to main content
Services
Full Stack MarketingWebsite designMedical SEOLocal SEOGoogle Business ProfileSocial media managementBranding & contentPatient acquisitionCRM & follow-upOnline bookingConversion optimizationHealthTech engineeringAI Era: AI integrationsPatient Support System
Who we help
New practicesEndometriosis specialistsPhysical therapistsMental health therapistsDietitiansDentistsMed spasInternational-patient clinicsHealthtech & femtech startups
Locations
United StatesFloridaNew YorkBrooklyn, NYTexasInternationalAustraliaCanadaTürkiye
PricingFree marketing auditAbout usBlogContact
HIPAA & Privacy

HIPAA Compliant Website Analytics: Tracking Without Exposing PHI

Learn which analytics setups keep patient data safe: when web data becomes PHI, why GA4 falls short, tool BAA status, what never to send, and how to audit.

By MedCare AgencyNovember 21, 2026Updated November 4, 20269 min read
HIPAA Compliant Website Analytics: Tracking Without Exposing PHI

There is no such thing as a HIPAA certified analytics tool. What you can build is a HIPAA-ready setup: a vendor that signs a business associate agreement (BAA) or software you host yourself, a tight limit on what data leaves your site, and a record that you checked. Google Analytics 4 does not fit that pattern for pages where visitors reveal health information, because Google says it makes no representations that Google Analytics satisfies HIPAA and offers no BAA.

This guide is for busy clinicians and practice managers who still want to know which pages bring in patients and which bookings come from search. It is also for the patients behind those numbers, who trust you with something private every time they visit.

Short answer

  • Can analytics be HIPAA compliant? Yes, if any vendor that receives PHI has signed a BAA, or you self-host, and you send only the minimum data needed.
  • Can you keep GA4? Only on pages that are not HIPAA-covered, and never in a way that gives Google access to PHI.
  • Does consent fix it? No. A cookie banner is not a substitute for a BAA.
  • What matters most? What you send, not just which tool you pick.

A BAA is required before a vendor handling PHI can receive it, under 45 CFR § 164.308(b). This is not legal advice. Ask your counsel to confirm your setup.

When website data becomes PHI

A page view alone feels harmless. Add an IP address, a cookie ID, and a visit to a page like “endometriosis treatment” or “book a fertility consult,” and you have a record that links a person to a health concern. That link is what regulators care about.

Authenticated and unauthenticated pages

The line that matters most is whether the visitor is logged in.

  • Authenticated pages are patient portals, telehealth waiting rooms, appointment management and test results. Tracking there is generally considered to involve PHI.
  • Unauthenticated pages are your public home page, service pages and blog. The risk is lower, but not zero, especially on pages with clear clinical context or a booking step.

If you run telehealth or a patient platform, treat everything behind the login as a no-third-party-tracking zone unless the vendor has signed a BAA.

What AHA v. Becerra changed, and what it did not

OCR published its bulletin on online tracking technologies on Dec 1, 2022 and revised it on Mar 18, 2024 (source). In July 2023, OCR and the FTC sent warning letters to 130 hospitals.

On June 20, 2024, a Texas federal court held in AHA v. Becerra that HHS exceeded its authority. It vacated the part of the guidance saying that metadata such as an IP address, collected on a regulated entity’s unauthenticated site, is individually identifiable health information. OCR withdrew its appeal on Aug 29, 2024.

The ruling was narrow. It addressed only unauthenticated public pages with no clear clinical context, and many teams read it more broadly than it says. The rest of the bulletin stayed in place. “Tracking is fine now” is the wrong takeaway.

Why Google Analytics (GA4) does not qualify

Google signs BAAs for certain Workspace services and specific Google Cloud products. Analytics, Tag Manager and Ads are not on that list. Google’s own help guidance says customers subject to HIPAA must not use it in a way that involves Google’s access to PHI, and may only use it on pages that are not HIPAA-covered.

Three common fixes do not change that:

  • IP masking. It removes one identifier, but URLs, parameters and event data can still carry health context.
  • Consent banners. Consent is not HIPAA authorization, and it does not replace a BAA.
  • Server-side GTM. One secondary source says that once data is forwarded to the GA4 endpoint, it leaves the BAA scope. Check this against Google’s documentation before relying on it.

Four compliant approaches

  1. Self-hosted analytics. Run the software on infrastructure you control, under a hosting agreement that covers PHI. Matomo is the usual example. Per Piwik PRO’s comparison, Matomo does not sign a BAA, so it must be self-hosted.
  2. Hosted analytics with a BAA. The vendor signs, and you configure it to collect only what you need.
  3. A PHI-scrubbing layer. A tool sits between your site and your vendors and strips identifying data before it moves on. Freshpaint is one example.
  4. Non-compliant tools on non-PHI pages only. For example, GA4 on a general blog, and nothing on booking or portal pages. This needs strict page rules and regular testing.

Not sure which tags on your clinic site are sending patient data to vendors without a BAA? Request a free website audit and get a clear list of what to fix first.

Tool comparison table

Vendor claims change, and published sources disagree about some tools. Treat this as a starting point and confirm in writing with each vendor. Status below is drawn from the vendor and secondary sources cited, not from each vendor’s own HIPAA page.

Tool BAA status Hosting Notes
Piwik PRO Will sign Hosted Per its own comparison (vendor source)
Mixpanel Will sign Hosted Same source
Amplitude Will sign Hosted Same source
Freshpaint Will sign Hosted PHI-scrubbing layer
Tealium Will sign Hosted Same source
Adobe Customer Journey Analytics Will sign Hosted Needs the Healthcare Shield add-on and a BAA
Adobe Analytics Not covered Hosted Not on Adobe’s HIPAA-ready list
Matomo No BAA Self-host Your hosting must cover PHI
PostHog Can provide a BAA Hosted or self-host Confirm plan terms
Heap Configurable Hosted Block IP and geolocation collection
Google Analytics 4 No BAA Hosted Non-PHI pages only

A signed BAA is not the finish line. You still decide what the tool receives.

What to never send to analytics

The tool matters less than the data layer. Decide what is allowed out of the browser, then block the rest.

URLs, query strings and referrers

Booking and intake links often carry names, emails, appointment types or conditions in the URL. Strip query strings before they reach any vendor. Watch UTM and referrer data on booking pages too.

Form fields and booking details

Never send field values, appointment reasons, provider names tied to a specialty, or condition names. “Form submitted” is fine. “Form submitted: IVF consult” from a named user is not.

Session replay and heatmaps

These tools can capture what a person types. Turn them off on forms, booking steps and anything authenticated, or mask every input.

Ad pixels and call tracking

The Meta Pixel and similar ad tags send page and event data to ad platforms that generally will not sign a BAA. Keep them off booking, portal and condition-specific pages unless counsel signs off. Call tracking that records calls or numbers needs the same BAA check.

Measuring conversions and ads without PHI

You can still learn which channels bring patients in.

Booking funnels

Measure steps, not people: viewed booking page, started booking, completed booking. Use a generic completion event with no service, provider or condition attached. If your booking widget lives on another domain, check what that vendor collects and whether it will sign a BAA. Our guide to booking integrations covers how we approach this.

Event design and naming

Name events for the action, not the person: booking_started, booking_completed, phone_click. Keep a written list of approved events and parameters. Anything not on the list does not ship.

Paid-media conversion signals

Send ad platforms as little as possible. A common pattern is to measure ads on public landing pages and count bookings inside your BAA-covered tool rather than passing booking events back to the ad network. Confirm each step with counsel.

Implementation checklist and audit

Run this before launch and then on a schedule. For wider site requirements, see our HIPAA compliance website checklist and our overview of what makes a website HIPAA compliant.

  1. Scan your tags. Use a tag scanner or your browser’s network tab to list every script, pixel and cookie on your key pages.
  2. Inventory vendors. Write down each vendor, what it receives, which pages it runs on, and whether a BAA is in place. Our page on the business associate agreement explains what to ask for.
  3. Test network requests. Walk the booking path as a patient would. Check each request for names, emails, URL parameters and form values.
  4. Remove or restrict. Delete tags nobody owns. Move anything without a BAA off sensitive pages.
  5. Document. Save screenshots, the vendor list, signed BAAs and the date of each test.
  6. Review on a cadence. Re-test after every site change, plugin update or new campaign, and at least a few times a year.

MedCare Agency builds clinic sites and booking flows with analytics designed in from the start, so there is less to clean up later. For telehealth and patient platforms, where the authenticated-page rules are strictest, the same thinking applies to custom builds.

HIPAA and GDPR together

If you serve patients in the EU or UK, HIPAA is only one set of rules. GDPR adds its own requirements for consent and data handling on top. A setup that works for both usually means collecting less data, loading non-essential tags only after a clear choice, and documenting every vendor. A consent banner helps with GDPR but does not make a HIPAA setup compliant. Have counsel review the combined approach.

Disclaimer and sources

This article is general information, not legal advice. Before publishing or changing your setup, check the HHS OCR bulletin page, Google’s HIPAA and Google Analytics help page, and each vendor’s HIPAA page directly. Many facts above come from law-firm and vendor summaries. For more reading, see the Proskauer analysis of OCR’s decision to withdraw its appeal and our HIPAA compliance page.

Want a second pair of eyes on your tags? Request a free website audit from MedCare Agency.

Frequently asked questions

Is Google Analytics 4 HIPAA compliant?

No. Google offers no BAA for Analytics and says customers subject to HIPAA must not use it in a way that gives Google access to PHI. It can only be used on pages that are not HIPAA-covered.

Does server-side tagging make Google Analytics HIPAA compliant?

No. One secondary source says that once data is forwarded to the GA4 endpoint, it leaves the BAA scope. Verify this against Google’s documentation and talk to counsel.

Is self-hosted Matomo HIPAA compliant?

Matomo does not sign a BAA, so it has to be self-hosted. Self-hosting can support compliance when your hosting setup covers PHI and you limit the data collected, but you carry the responsibility for the safeguards.

Do I need analytics consent on a public clinic website?

HIPAA treats consent and authorization differently. A cookie banner does not replace a BAA, and it does not make PHI sharing acceptable. Consent may still matter under GDPR or other privacy laws.

Can I track appointment bookings?

Yes, if you track the action and not the person. Send a generic event such as booking_completed with no names, services, conditions or URL parameters, and only to a tool covered by a BAA.

Keep reading

More from the blog

See all articles

Get in touch

Let’s find the patients your marketing is missing.

Book a free marketing audit and we’ll map your whole funnel, from Google to the booked appointment. Opening a new practice? Start free with the Launch program.