Skip to main content
Dark green background, "Weak Application Security Can Cost You Millions," 3 slanted images of fingers pointing to digital locks, and a "Learn the Basics" button
Audit Patient Portal Trackers Before the Lawsuit Finds YouData Privacy
7 min readFor Data Privacy Officers

Audit Patient Portal Trackers Before the Lawsuit Finds You

The $1.8 million Atrium Health settlement isn't an anomaly. It's a warning of what happens when your web analytics stack mishandles protected health information. Nearly 586,000 patients had their portal activity transmitted to Meta and Google between January 2015 and July 2019 because nobody audited what the marketing team installed.

You're at risk if you haven't inventoried every tracking pixel, tag manager, and analytics script on your patient-facing properties. Here's how to fix it before you're writing settlement checks.

Why This Matters Now

Class action lawsuits over web trackers are a major legal risk for healthcare organizations using third-party analytics. While the Office for Civil Rights issued guidance in 2022 and 2024 warning about HIPAA violations, regulatory enforcement has slowed. The real financial threat comes from patient lawsuits alleging privacy invasion when their portal sessions, appointment searches, or prescription refill activity gets sent to advertising platforms.

Kaiser Permanente's $47.5 million settlement last week and Atrium Health's $1.8 million payment show the pattern: organizations discover years-old tracker deployments, file HIPAA breach reports affecting millions of patients, then face class action claims. The Federal Trade Commission pursued enforcement actions against telehealth companies like GoodRx and BetterHelp during 2023-2024, but those cases targeted specific deceptive practices rather than the broader tracker ecosystem.

Your exposure depends on three factors: how long the trackers ran, what patient actions they captured, and whether you can prove you obtained informed consent. Most organizations can't prove the third element because consent forms never mentioned third-party data sharing for analytics.

What You Need Before Starting

You'll need cross-functional access and specific technical capabilities:

Team Access:

  • Admin credentials for your tag management platform (Google Tag Manager, Adobe Launch, Tealium)
  • Access to patient portal codebase and deployment history
  • Marketing automation platform admin access
  • Legal review authority for consent language changes

Technical Requirements:

  • Browser developer tools (Chrome DevTools or Firefox Developer Edition)
  • Network traffic capture tool (Fiddler, Charles Proxy, or Wireshark)
  • Your web application firewall logs for the past 90 days
  • Git commit history for your portal's frontend code

Documentation You'll Create:

  • Tracker inventory spreadsheet with deployment dates, data captured, and business justification
  • Data flow diagram showing what information reaches which third parties
  • Risk assessment for each tracker against HIPAA's minimum necessary standard
  • Remediation plan with timeline and responsible owners

Legal Preparation: Get your privacy counsel involved before you start. If you discover problematic trackers, you may need to file a HIPAA breach report with the Office for Civil Rights within 60 days of discovery. Your legal team will determine whether the tracking constitutes a breach requiring notification.

Step-by-Step Implementation

Step 1: Map Every Third-Party Script on Patient-Facing Properties

Start with your patient portal login page. Open Chrome DevTools (F12), navigate to the Network tab, and load the page. Filter by "JS" to see JavaScript files. Document every domain that isn't yours.

Common culprits:

  • connect.facebook.net (Meta Pixel)
  • www.googletagmanager.com (Google Tag Manager)
  • www.google-analytics.com (Universal Analytics)
  • googleads.g.doubleclick.net (Google Ads conversion tracking)
  • Third-party chat widgets (Drift, Intercom, LivePerson)

For each external script, record:

  • Domain and specific file path
  • What page it loads on (login, appointment booking, prescription refill)
  • When it was added (check Git history: git log --all --full-history -- path/to/file)
  • Who requested it (search email for the domain name)

Step 2: Capture What Data Each Tracker Actually Transmits

Install a network proxy tool like Charles Proxy or use Chrome DevTools' Network tab with "Preserve log" enabled. Complete a full patient portal workflow: log in, view test results, schedule an appointment, request a prescription refill.

For each tracker request, examine the query parameters and POST body. Look for:

  • Patient identifiers (MRN, account number, email address)
  • Authentication tokens or session IDs
  • Page URLs containing appointment types, provider names, or diagnosis codes
  • Form field values (medication names, symptoms, reason for visit)

Meta Pixel commonly captures:

  • em parameter (hashed email address)
  • client_user_agent (browser fingerprint)
  • event_source_url (full page URL, often containing PHI)

Google Analytics typically sends:

  • cid (client ID, a persistent user identifier)
  • dl (document location, the full URL)
  • dt (document title, which might include patient names or appointment details)

Step 3: Classify Each Tracker Against HIPAA's Definition of PHI

Protected health information under HIPAA includes individually identifiable health information transmitted or maintained in any form. If your tracker sends a hashed email address alongside a page URL like /portal/appointments/cardiology, you've disclosed that this patient sought cardiology care.

Create a risk matrix:

High Risk (Remove Immediately):

  • Trackers on authenticated pages sending any user identifier
  • Pixels capturing form submissions with health information
  • Session replay tools (Hotjar, FullStory) recording portal interactions

Medium Risk (Requires Consent and Data Minimisation):

  • Analytics on public health information pages (no authentication required)
  • Conversion tracking for appointment scheduling (if properly anonymized)
  • Performance monitoring tools that capture page load times only

Low Risk (Acceptable with Documentation):

  • First-party analytics with no third-party data sharing
  • Infrastructure monitoring (CDN performance, error tracking) with no user identifiers

Step 4: Implement Technical Controls for Acceptable Trackers

If you determine certain analytics serve a legitimate business purpose and you can obtain proper consent, configure them to minimize data exposure:

For Google Tag Manager:

// Remove PHI from URLs before sending to GA4
gtag('config', 'G-XXXXXXXXXX', {
  'page_location': window.location.href.split('?')[0], // Strip query params
  'page_title': 'Patient Portal', // Generic title
  'user_id': undefined, // Never send patient identifiers
  'client_id': undefined // Don't persist across sessions
});

For Meta Pixel: Disable automatic advanced matching, which hashes form fields:

fbq('init', 'PIXEL_ID', {
  em: undefined,
  ph: undefined,
  external_id: undefined
}, {
  agent: 'custom' // Disable automatic [hashing](/glossary/hashing)
});

Implement a Content Security Policy that blocks unauthorized scripts:

Content-Security-Policy: script-src 'self' https://approved-analytics.example.com; connect-src 'self'

This prevents marketing teams from adding new trackers without security review.

Step 5: Update Consent Mechanisms

Your existing patient portal terms of service probably don't cover third-party analytics. You need explicit, informed consent that explains:

  • What third parties receive data
  • What specific information gets shared (be precise: "page URLs you visit, appointment types you view")
  • The purpose (analytics, advertising, service improvement)
  • How patients can opt out

Deploy a Consent Management Platform that:

  • Blocks all non-essential trackers until consent is granted
  • Provides granular choices (analytics separate from advertising)
  • Respects "Do Not Track" signals
  • Logs consent decisions with timestamps

Test your implementation: decline all consent, then verify in DevTools that no third-party requests fire.

Validation - How to Verify It Works

Technical Validation:

Run a full regression test with network monitoring:

  1. Create a test patient account
  2. Decline all tracking consent
  3. Complete every portal workflow (login, view records, schedule appointment, message provider)
  4. Verify zero requests to advertising/analytics domains in DevTools Network tab

Then repeat with consent granted and verify:

  • Only approved domains receive requests
  • No URLs contain PHI (patient names, MRNs, diagnosis codes)
  • No request parameters include email addresses or other identifiers

Compliance Validation:

Your privacy officer should review:

  • Updated Business Associate Agreements with any analytics vendors (Google, Adobe, etc.)
  • Consent form language for plain-language clarity
  • Data flow diagram showing what information reaches which processors
  • Your breach notification determination (did you discover a past violation requiring OCR reporting?)

Legal Validation:

If you discovered trackers that transmitted PHI without authorization, you likely have a breach. The Office for Civil Rights requires notification within 60 days of discovery. Your legal team will assess:

  • How many patients were affected
  • What information was disclosed
  • Duration of the exposure (the Atrium Health breach ran from January 2015 to July 2019)
  • Whether you need to report to OCR and notify patients

Don't delay this assessment. The 60-day clock starts when you discover the breach, not when you finish remediation.

Maintenance / Ongoing Tasks

Quarterly Tracker Audits:

Schedule recurring reviews of your patient portal's third-party scripts. Marketing teams add new tools constantly. Your quarterly audit should:

  • Run the network capture process described in Step 2
  • Compare current tracker inventory against approved list
  • Review any new domains and assess HIPAA risk
  • Update your data flow diagram

Change Control for Frontend Deployments:

Require security review before any new JavaScript library or tag gets deployed to patient-facing pages. Your approval workflow should include:

  • Privacy impact assessment
  • Data flow documentation
  • Business Associate Agreement verification (if the vendor processes PHI)
  • Consent language updates (if needed)

Monitor Regulatory Guidance:

While the Office for Civil Rights hasn't issued new tracker guidance recently, enforcement priorities shift with administrations. Subscribe to OCR's breach notification updates and monitor class action filings in healthcare. When you see settlements like Atrium Health's $1.8 million payment or Kaiser Permanente's $47.5 million agreement, audit whether you have similar exposure.

Annual Consent Review:

Privacy regulations evolve. Review your consent mechanisms annually to ensure they meet current standards for:

  • Granularity (separate choices for different purposes)
  • Clarity (no legalese)
  • Accessibility (screen reader compatible, available in required languages)
  • Withdrawal (easy opt-out process)

Vendor Due Diligence:

When evaluating new marketing or analytics tools, ask vendors:

  • Do you qualify as a HIPAA Business Associate?
  • What Data Minimisation controls do you offer?
  • Can we disable automatic data collection features?
  • Do you support consent-based activation?

If a vendor can't answer these questions or refuses to sign a Business Associate Agreement, they're not appropriate for patient-facing properties.

The tracker audit you run this week protects you from the lawsuit you'd face next year. Atrium Health's settlement shows the cost of discovering these problems too late.

Application Security Isn’t Optional Anymore.

You Might Also Like