Google Analytics vs PostHog for HIPAA: which fits when PHI is in scope
If protected health information (PHI) can reach Google Analytics, Google Analytics is ruled out for that site or app. Google's Analytics HIPAA help page says Google does not offer a Business Associate Agreement (BAA) for Google Analytics and that HIPAA-regulated entities must refrain from exposing PHI to Google through it. PostHog is the only one of the two with a documented BAA route, and that route covers PostHog Cloud on named plans. The first task is to trace where PHI could enter an analytics tool: URL query strings, page titles, form fields captured by autocapture, and custom event properties. Illustrative example: a symptom checker that passes a condition name in its URL would send PHI to any analytics tag on that page, whichever tool is installed.
The decision turns on three questions. First, can PHI be kept out of each tool? For Google Analytics, the only defensible case is a property that provably never receives PHI, such as a public information site with no authenticated or condition-specific pages, and the team has to demonstrate that boundary. Second, is PostHog Cloud under a BAA acceptable to the compliance office? PostHog's HIPAA page offers BAAs for PostHog Cloud only, through the platform package for the standard BAA or the Enterprise package for a custom one, and it names Boost, Scale and Enterprise as plans. Confirm which plan carries the standard BAA and that it covers each feature you plan to use, because the managed reverse proxy and PostHog AI are not covered by BAAs and should not process PHI.
Third, can the team run and evidence a self-hosted stack? PostHog recommends PostHog Cloud under a BAA over self-hosting, but for self-hosting it says to use HTTPS, follow its securing guide and limit access. Self-hosting can suit a team that already operates and audits its own infrastructure and can show who has access and how the stack is patched and logged. The free Docker Compose hobby deployment is MIT licensed, while premium features in the ee directory need a PostHog license. Under the Security Rule, covered entities and business associates must protect electronic PHI (45 CFR 164.302), and each addressable implementation specification needs a documented decision (45 CFR 164.306(d)). This page covers only the HIPAA question. The general product comparison sits on its own page.
Three answers decide which HIPAA path is open to you
Google Analytics and PostHog open different HIPAA paths, and the first question is whether PHI can stay out of the tool at all. The second is whether the vendor will sign a business associate agreement for the plan you need, and the third is whether your team can run and evidence a self-hosted install. Each card names the path it opens or closes and the documented fact behind it.
Keep PHI out of the tool
This is the first gate. Google's Analytics Help page on HIPAA says HIPAA-regulated entities must refrain from exposing PHI to Google through Analytics, so if PHI would reach GA4 events, page URLs or user properties, the Google path is closed. PostHog's HIPAA page also leaves compliance with the customer. Review your event schema, autocapture settings and session replay masking before any contract discussion, because a signed agreement does not change what is in the data payload.
Google HIPAA pageCheck BAA availability for your plan
A business associate agreement is the contract that makes a vendor accountable for PHI it handles for you. Google does not offer a BAA for Google Analytics, so the Google path closes for any workload that needs one. PostHog offers BAAs for PostHog Cloud only, on a platform package for the standard BAA or the Enterprise package for a custom BAA, and its page names Boost, Scale and Enterprise. Confirm in writing which tier includes the standard BAA before any PHI flows.
PostHog HIPAA pageTurn off features outside the BAA
A BAA can cover a vendor's core service and still leave some features out. PostHog's HIPAA page says its managed reverse proxy and PostHog AI features are not covered by BAAs and should not process PHI. Any PostHog setup that relies on those features is closed for PHI until the terms change. Inventory where the reverse proxy sits in your request path, list which AI features are enabled, and confirm that each one stays out of PHI scope.
Run self-hosting in-house
Self-hosting keeps PHI inside your own infrastructure, but PostHog's HIPAA page recommends PostHog Cloud under a BAA over self-hosting. For self-hosted installs, the same page says to use HTTPS, follow the securing guide and limit access. If your team cannot own patching, access control and backups, the self-hosted path is closed in practice. PostHog's free Docker Compose hobby deployment runs under the MIT license, and PostHog recommends a server with 4 vCPU, 16 GB of RAM and more than 30 GB of storage. Ask your platform team to test restores before committing.
Check the ee license
PostHog's README says that premium features from the ee directory on a self-hosted instance require a PostHog license. Teams that need fully free software can use the posthog-foss repository, which removes all proprietary code and features. Self-hosting with ee features adds a licensing step to the plan. List the features your analytics program needs, check each against the ee directory, and get the license terms in writing before you choose this path.
Keep the evidence with your team
The HIPAA Security Rule applies to covered entities and business associates for electronic PHI. It sets 18 standards across administrative, physical and technical safeguards, and each implementation specification is either required or addressable. For an addressable specification, you must document whether it is reasonable and appropriate and, if not, the equivalent measure you chose. Whichever path you choose, the documentation and the decisions behind it are yours. Neither vendor's pages replace that record.
Security Rule textWhat HIPAA's Security Rule asks of a web or product analytics tool
The Security Rule applies to covered entities and business associates for electronic protected health information, and it is codified at 45 CFR Part 164 Subpart C, sections 164.302 to 164.318. Its safeguards are listed in Appendix A, which sets 18 standards across administrative (164.308), physical (164.310) and technical (164.312) safeguards, with 36 implementation specifications: 14 required and 22 addressable. For an analytics tool, the first question is whether ePHI can reach it at all. That depends on the events, page paths, form fields and session recordings you configure. A portal URL that includes a clinic specialty, an autocaptured form field, or a recording of a booking screen can each carry ePHI into the tool, so map those paths before reading any vendor documentation.
Addressable does not mean optional. Under 164.306(d), for each addressable specification you must assess whether it is reasonable and appropriate in your environment. If it is not, you document why and implement an equivalent alternative measure where that is reasonable and appropriate. Encryption is a useful example. Transmission security (164.312(e)) and encryption and decryption (164.312(a)(2)(iv)) are addressable, so a team that relies on HTTPS and encrypted storage should record that choice and its reasoning in the risk analysis. Required specifications have no such choice, so they must be implemented as written. An assessor will look for the documented decision on each addressable item, not only the control itself.
Whether a vendor is a business associate depends on whether it creates, receives, maintains or transmits PHI on your behalf, and counsel should settle that question before any data flows. Google states that it does not offer a Business Associate Agreement for Google Analytics and that HIPAA-regulated entities must keep PHI out of it. PostHog offers a BAA for PostHog Cloud only under its platform or Enterprise package, and states that its managed reverse proxy and AI features are not covered. Read the HHS FAQ on certification before accepting any vendor badge as evidence. Ask each vendor for the signed agreement, the list of covered features and a data flow diagram.
How Google Analytics and PostHog meet HIPAA as documented
This table compares Google Analytics and PostHog row by row on the points an assessor checks first: BAA coverage, excluded features, self-hosting, retention, access, evidence, data location and data copies. Where a vendor document does not state a detail, the cell names what to ask the vendor to confirm. The main takeaway: only PostHog offers a BAA for its Cloud service, and even that excludes some features, so confirm scope in writing before any PHI enters either tool.
| Topic | Google Analytics | PostHog |
|---|---|---|
| BAA availability | No BAA is offered for Google Analytics, and Google makes no representation that it meets HIPAA. | Offered for PostHog Cloud only: a platform package for the standard BAA, or the Enterprise package for a custom BAA. |
| Features excluded from coverage | Nothing is covered. Google says HIPAA-regulated entities must not expose PHI through it. | Managed reverse proxy and PostHog AI are not covered by a BAA and should not process PHI. |
| Self-hosting | Google-operated service. Confirm with Google whether any self-hosted or private deployment is offered. | Vendor recommends Cloud under a BAA over self-hosting. Self-hosting needs HTTPS, the securing guide and limited access. |
| Retention | Standard properties: 2 or 14 months. Analytics 360: up to 50 months. The setting affects explorations and funnel reports only. | Not stated in the HIPAA documentation. Ask for retention periods for Cloud under the BAA and for self-hosted data. |
| Access control | Role-based user access. Confirm which roles can view event data and how access reviews are evidenced. | Confirm SSO, role controls and audit logs for the BAA package. Self-hosted access must be limited per the securing guide. |
| Audit and attestation evidence | Google publishes an Analytics security page that references ISO 27001. Confirm the certificate scope covers Analytics. | Public security handbook. Ask for any third-party reports and whether their scope includes the BAA service. |
| Data location | Ask Google where Analytics data is stored and processed, and whether a region can be chosen. | Cloud offers US or EU regions. Confirm which region the BAA covers. Self-hosted data stays in your infrastructure. |
| Data copies such as BigQuery exports | Standard export cap is 1 million events a day. Analytics has no BAA, so ask Google whether exports are covered. | Pipeline exports are not addressed in the HIPAA page. Confirm whether they fall under the BAA. |
Where PHI could leave your boundary in each analytics path
The diagram starts at the visitor's browser, which can send the same page events along three paths. The Google Analytics path has no Business Associate Agreement, so PHI must stay out of it entirely. The PostHog Cloud path is covered by a BAA only under the platform or Enterprise package, and the managed reverse proxy and PostHog AI sit outside that coverage, so they should not receive PHI. The self-hosted path keeps data inside your network behind HTTPS, but the controls, access limits and safeguards become your responsibility. Check which hand-offs your configuration actually uses before you assume any path is covered.
Visitor events leave the browser along three paths with different PHI boundaries.
How long analytics records stay in each tool, and what assessors check
Google Analytics 4 retention is set on each property, and the choice decides how far back an analyst can drill into user-level and event data. Standard properties offer 2 or 14 months, while Analytics 360 properties add 26, 38 and 50 month options. The setting governs explorations and funnel reports, and standard aggregated reports are unaffected. An assessor may therefore see months-old trends in a standard report after the exploration behind its detail has expired. Record the configured value, the properties it covers and the reports your team relies on for decisions in your data inventory, then confirm the setting with the property administrator. Google's data retention guidance explains each option.
Universal Analytics is the gap assessors will test first. Google stopped processing data for standard Universal Analytics properties on July 1, 2023, gave 360 properties with a current order a one-time extension to July 1, 2024, and ended access to all Universal Analytics data the week of July 1, 2024. Unexported data was permanently deleted. Any older record you need for an audit trail, a trend baseline or an incident review now exists only in exports your team made earlier. Search for those files, identify their owners, and confirm they are encrypted and access-controlled. If nothing was exported, document that the data no longer exists so the gap is explained when an assessor asks.
For PostHog, retention is a question to settle before you choose a plan. Ask PostHog in writing which retention windows apply to your plan, your region and each product, including session recordings, event data and any exports, and whether you can change those windows and who can. Assessors will ask for the configured setting, a written retention rule and proof that deletion or export runs on schedule. PostHog's HIPAA page says BAAs apply to PostHog Cloud only, under the platform or Enterprise package, and that the managed reverse proxy and PostHog AI should not process PHI. If you self-host, retention, backups and deletion become your own procedures to document and test. PostHog's HIPAA compliance page sets out these conditions.
Evidence a HIPAA assessor asks for from each analytics tool
Google Analytics has no BAA for an assessor to examine. Google's HIPAA help page says Google does not offer Business Associate Agreements for the product, makes no representation that it satisfies HIPAA requirements, and tells regulated entities to keep PHI out of it. The evidence file therefore proves exclusion and configuration, and your team produces nearly all of it.
- Written position on the missing BAA: a dated copy of Google's HIPAA page captured for the review, and your own statement of how you rely on PHI exclusion instead.
- PHI exclusion test results: your tests of page URLs, query strings, form fields, custom parameters and user identifiers, run before and after each tag change. Google does not produce these.
- Event and tag inventories: a current list of every event, parameter and tag with a named owner, plus any BigQuery export configuration.
- Retention and role settings: the data retention value on each property (standard properties offer 2 or 14 months, per Google's data retention page) and a dated list of users and roles with access reviews.
- Decision records: for each addressable specification that touches analytics, a dated record under 45 CFR 164.306(d) showing whether it is reasonable and appropriate, why, and the equivalent measure you chose.
Ask your assessor early whether an exclusion-based position is acceptable for a tool without a BAA, because that answer decides how much of this file you must build.
A BAA is offered for PostHog Cloud only, and the signed agreement is the first artifact an assessor will ask for. PostHog's HIPAA page says the standard BAA comes with a platform package, a custom BAA comes with the Enterprise package, and the managed reverse proxy and PostHog AI features are not covered. Your evidence must show what the agreement covers and how you kept PHI out of everything it does not.
- Signed BAA and covered package: the executed agreement with its date and the package it names, plus written confirmation from PostHog that the services you use fall under it. PostHog supplies these.
- Scope exclusions: the written statement that the managed reverse proxy and PostHog AI features sit outside BAA coverage, and your configuration showing they are disabled or kept away from PHI. You keep the configuration evidence.
- PHI exclusion test results: your tests showing PHI does not reach event properties, person properties, identify calls or session replay, since PostHog's page places regulatory compliance on the customer. You produce these.
- Retention, role and audit settings: the retention setting for each project, the role assignments, and any audit log exports the console provides for your package. Confirm the export options with PostHog, then keep copies yourself.
- Decision records: for each addressable specification under 45 CFR 164.306(d), your recorded judgment and any equivalent measure. PostHog cannot write these for you.
Ask PostHog in writing which artifacts it issues under your package, then assign each item in this list to an owner before the review starts.
Self-hosting removes the BAA from the file, so your organization produces almost every record. PostHog's HIPAA page recommends PostHog Cloud under a BAA over self-hosting, and for self-hosted deployments it asks you to use HTTPS, follow the securing guide and limit access. The free Docker Compose hobby deployment is MIT licensed, but premium features in the ee/ directory need a PostHog license, so your license record depends on what you enable.
- HTTPS and certificate records: TLS configuration, certificate inventory and renewal records, and the reverse proxy settings that terminate traffic, with a dated record that the securing guide steps were followed.
- Access configuration: network rules, the admin account list, SSO and MFA settings where you use them, and evidence of periodic access reviews.
- License for
ee/features: the PostHog license covering any premium features you enable, with a list of those features. If you run only MIT-licensed code, record that along with the version you deployed. PostHog issues the license, and you keep the record. - Hosting and backup records: host and database logs, backup and restore test records, and the hosting provider's own assurance reports. Request those separately, because your hosting provider, not PostHog, controls that layer.
- Decision records and upgrade history: addressable specification decisions under 45 CFR 164.306(d), plus a change record for each upgrade so the assessor can see the configuration at each point in the review period.
Confirm with your security team which of these records live in your change management system and who signs each one, because an assessor will ask for the current version and its history.
Configure the HIPAA analytics path your team chooses
This sequence removes Google Analytics from PHI-capable pages, puts PostHog under a BAA or a self-hosted setup your team controls, and tests that PHI stays out of analytics events. Privacy, security and engineering staff own the steps in order, and each step closes with a record an assessor can review.
Map every page and event where PHI appears
Start with a scope review led by your privacy or compliance owner, with product and engineering input. List every page, form, app screen and event that can show or collect protected health information, including authenticated areas, appointment and intake flows and support pages. Mark each one as PHI-capable or PHI-free. The output is a signed-off inventory that every later step uses as its reference, so no tag is changed until the list is approved.
Remove Google Analytics from PHI-capable surfaces
Engineers remove the Google Analytics tag, its tag manager triggers and any direct analytics calls from every PHI-capable surface, including server-side tagging and mobile apps where they exist. Google's HIPAA guidance for Analytics says Google does not offer a Business Associate Agreement for Analytics and that regulated entities must not expose PHI to it, so removal on these surfaces is mandatory. Confirm the result by loading each page with network logging on and checking that no request reaches Google Analytics collection endpoints. The output is saved network logs for each surface, filed with the inventory.
Sign the PostHog BAA or choose self-hosting
Decide between PostHog Cloud under a Business Associate Agreement and a self-hosted deployment your team runs. PostHog offers BAAs for PostHog Cloud only, on the platform package for the standard BAA or the Enterprise package for a custom BAA, so ask PostHog which package fits your contract and get the agreement countersigned before any PHI reaches the tool. PostHog's HIPAA page recommends Cloud under a BAA as the first option. The output is either an executed BAA or a written self-hosting decision that names the owner of the server.
Harden self-hosted PostHog or review Cloud access
If you self-host, your team deploys PostHog and enables HTTPS on every endpoint, then follows PostHog's securing guide to restrict administrator, database and server access to named roles. Confirm whether any premium features from the ee directory are in use, since the README says those need a PostHog license on self-hosted instances. If you chose Cloud, review who holds project and organization roles instead. The output is an HTTPS check, a signed-off access list and a license confirmation, or a Cloud role review filed with the decision log.
Keep the proxy and AI off PHI paths
Route PHI-capable pages away from the managed reverse proxy, and disable or avoid PostHog AI features on any project that receives PHI. PostHog's HIPAA page says the managed reverse proxy and AI features are not covered by a BAA and should not process PHI, so they can only run on surfaces the inventory marks PHI-free. Confirm with PostHog how to disable each feature under your plan. The output is a configuration record showing the snippet and proxy settings for each PHI surface.
Strip PHI from every event payload
Before any event leaves the browser or server, remove names, contact details, dates of service, record identifiers, free-text entries and URL query strings that carry PHI. Engineers build an allowlist of event properties and page URL fields, so any new field is dropped until someone reviews it. Check autocapture and session replay masking settings for fields that echo PHI. A privacy engineer then reviews a sample of captured events. The output is the allowlist and a dated sample review record.
Test that PHI stays out of analytics
Run test sessions through each PHI-capable flow using synthetic records that look like PHI, so no patient data from production is copied into test tools. Inspect the PostHog event stream and the browser network traffic for names, identifiers and URL parameters, and confirm that no request reaches Google Analytics. Repeat the test after each release that touches tracking. The output is a dated test report with pass or fail results for each surface, plus remediation tickets for any leak.
Document each addressable decision
Under the HIPAA Security Rule, each implementation specification is either required or addressable. For an addressable one, the entity must assess whether it is reasonable and appropriate, and if it is not, document why and put an equivalent alternative measure in place (45 CFR 164.306(d)). Record the BAA or self-hosting choice, access controls, the proxy and AI exclusions, PHI filtering rules and test results in one decision log. The output is that log, linked to your risk analysis and ready for an assessor.
What buyers ask before they hire help for HIPAA analytics
Can configuring Google Analytics make it HIPAA compliant?
No. Google does not offer a Business Associate Agreement for Google Analytics and makes no representation that the product satisfies HIPAA requirements, so configuration cannot close that gap. Google's HIPAA help page tells HIPAA-regulated entities to refrain from exposing protected health information to Google through the product. The practical question becomes scope control: which pages, events, form fields and user identifiers could ever carry PHI, and whether your team can prove none reach the tag. Filters, consent settings and retention changes reduce exposure, but they do not create a contractual relationship with Google. If analytics must run on patient-facing or authenticated pages, the decision is about where the tool sits in your architecture. Confirm the current wording on Google's help page with your counsel before you rely on it.
Does PostHog need a business associate agreement, and on which plan?
PostHog offers a BAA only for PostHog Cloud, and only on certain packages. According to PostHog's HIPAA page, the standard BAA comes with a platform package, while a custom BAA requires the Enterprise package. The page names Boost, Scale and Enterprise, so confirm in writing which package carries the standard agreement before you sign or start building. Two details shape scope. The managed reverse proxy and PostHog AI features are not covered by BAAs and should not process PHI, and the page states that ensuring compliance with regulations is the customer's responsibility. Ask PostHog for the executed BAA text and its list of covered features, then treat anything outside that list as off limits for PHI.
Does self-hosting PostHog avoid the need for a BAA?
No. Self-hosting moves the infrastructure into your environment, but it does not remove your HIPAA obligations. Covered entities and business associates must comply with the Security Rule for electronic protected health information, and if the analytics system receives ePHI, it falls inside that scope. Your organization carries the safeguards, documentation and access controls itself. PostHog's HIPAA page recommends PostHog Cloud under a BAA over self-hosting. For self-hosted installs, the page points to HTTPS, its securing guide and limiting access. The MIT license on the free Docker Compose hobby deployment says nothing about your compliance posture. Your assessor will ask who signed what, who operates the server, how patches are applied and where backups live, and those answers must come from your own records.
What drives the cost and effort of HIPAA analytics help?
The written scope drives most of it. Costs come from four places: the PostHog subscription and any package needed for a BAA, your internal staff time, the implementation work, and ongoing support. Implementation is largely one-time, while subscriptions, hosting, upgrades and retainers recur. If you export Google Analytics data to BigQuery, Google's export help states that streaming export adds BigQuery charges of $0.05 per GB. Effort grows with the number of properties, events, identified users, integrations, environments and PHI boundaries that must be tested. DeployOpen's engagements are typically fixed-scope and DeployOpen does not publish a price list, so the quote follows from the written scope. Ask for deliverables, responsibilities, assumptions, timelines, exclusions and the cost of upgrades and retesting, in one document.
What does the work need from our team?
The work needs a named owner for each data decision, access to your identity and hosting environment, and time to document decisions. The Security Rule's Appendix A lists 18 standards across administrative, physical and technical safeguards, with 36 implementation specifications: 14 required and 22 addressable. For an addressable specification, you must assess whether it is reasonable and appropriate, document the decision and implement an equivalent measure if needed. That documentation is what an assessor reads first. In practice, your team decides what may enter analytics, configures SSO and role-based access, sets retention and audit logging, and confirms the vendor agreement covers the features in use. Self-hosted installs also need an owner for HTTPS, server hardening, backups and patching. Name who signs off each decision before work starts.
Can our team run HIPAA analytics setup without outside help?
Yes, if your team already has security, compliance and platform capacity and the scope is narrow. Teams usually need outside help when analytics touch authenticated or patient-facing pages, when several tools share data, or when no one on staff has operated a self-hosted service. Test four points. Can you write the data boundary and prove it? Do you have someone who can run the self-host stack with HTTPS, access limits and backups? Can you keep up with upgrades? Can you produce evidence on your own schedule? If any answer is no, a partner can fill the gap, but your organization still owns the compliance decisions and the records that support them. Keep those decision records in your own system so they remain available after the engagement ends.
Does DeployOpen certify HIPAA compliance for our analytics?
No. DeployOpen does not issue audit reports, attestations or certifications. DeployOpen prepares systems, controls and evidence for compliance assessments, while independent auditors and certification bodies issue the outcome of any assessment. HIPAA's Security Rule is a regulation your organization must meet, and HHS publishes an FAQ on whether organizations must certify their compliance with the standards. Read that FAQ before you assume a certificate is needed. Engagement scope and deliverables are agreed in writing before work starts. Ask any partner which evidence it produces, who signs that evidence, and whether it will retest your setup after changes.
How DeployOpen prepares HIPAA analytics evidence without favoring either tool
DeployOpen tests Google Analytics and PostHog against the same HIPAA Security Rule questions, then documents the result for each option. Work is scoped in writing before it starts, covers the option you select, and ends in material your compliance and security teams can review. DeployOpen prepares systems, controls and evidence, but it does not issue audit reports, attestations or certifications.
How we scope
- A written scope names which tool, deployment path and data flows are in the HIPAA review.
- Scope confirms whether any PHI could reach analytics tags, events, session replay or AI features before build starts.
- Fixed-scope agreements set deliverables and timelines in writing; ongoing support is available as a retainer.
How we build
- For Google Analytics, we document the missing BAA and map which data paths must be blocked before collection.
- For PostHog Cloud, we map the BAA package tier, the excluded reverse proxy and AI features, and event payloads.
- For self-hosted PostHog, we configure HTTPS, limit administrative access and apply the vendor's securing guide.
How we hand over
- Handover includes a control matrix mapping each Security Rule standard to the configuration, owner and evidence.
- Addressable specifications get a documented assessment, the reasoning for each decision, and the equivalent measure chosen.
- Evidence packs are written for your assessor and counsel, and DeployOpen does not issue audit reports or attestations.
How we support
- Retainers can cover upgrades, continuous testing and re-review when PostHog or Google changes its HIPAA terms.
- Re-check the BAA scope after any plan change, since coverage depends on the package you buy.
- Confirm internally which team owns incident response, access reviews and log retention before go-live.
Sources and further reading
- HIPAA and Google Analytics ↗
- PostHog HIPAA compliance ↗
- 45 CFR Part 164 Subpart C, Security Standards for the Protection of Electronic Protected Health Information ↗
- Appendix A to Subpart C of Part 164, Security Standards: Matrix ↗
- HHS FAQ 2003: Are we required to certify our organization's compliance with the standards? ↗

