Web analytics in healthcare: data protection for hospitals, practices and pharmacies

On a practice or hospital website, the page someone opens often reveals more than you would like. What the Swiss FADP says about health data, what role professional secrecy plays and how to measure statistics without capturing diagnoses.

In short

Under Art. 5(c) FADP, data about health is sensitive personal data. Where consent is needed it must be express, and large-scale processing requires a data protection impact assessment. On healthcare websites such data arises quickly, for example through addresses like /treatment/diabetes, search terms or appointment forms. If you measure, collect only aggregated numbers, exclude sensitive pages and never record forms.

Health data is sensitive personal data

The Swiss Data Protection Act (FADP) counts data about health among sensitive personal data (Art. 5(c)(2) FADP). Stricter rules follow from that:

  • Express consent: where processing is based on consent, it must be express for sensitive data (Art. 6(7)(a) FADP). Simply continuing to browse is not enough.
  • Data protection impact assessment: extensive processing of sensitive data requires an impact assessment in advance (Art. 22(2)(a) FADP).
  • Record of processing activities: companies with fewer than 250 employees are normally exempt. The exemption does not apply if they process sensitive data on a large scale (Art. 24(a) of the Data Protection Ordinance).

The FDPIC guideline on cookies and similar technologies classifies the processing of sensitive data as high-intensity processing. For that, the controller must obtain express consent beforehand (section 3.10). For ordinary visitor statistics without a health context, the general rule for private controllers applies: information and a way to object under Art. 45c of the Telecommunications Act. The guide Swiss FADP and website analytics explains this rule in detail.

As far as our research shows, the FDPIC has not published its own guidance on tracking on healthcare websites. Its guide for the medical sector dates from 2002, under the old FADP, and does not cover tracking or cookies. Public hospitals are also often subject to cantonal law, see Web analytics for public authorities.

Professional secrecy under Art. 321 of the Criminal Code

Besides the FADP, professional secrecy applies to many healthcare professions. According to the Canton of Solothurn's guide on release from professional secrecy, it covers doctors, dentists, chiropractors, pharmacists, midwives, psychologists and nurses. It also covers physiotherapists, occupational therapists, nutritionists, optometrists and osteopaths, each together with their assistants. A breach is punishable, on complaint, by a custodial sentence of up to three years or a monetary penalty.

In addition, Art. 62 FADP punishes the intentional breach of professional confidentiality, on complaint, with a fine of up to CHF 250,000. If patient information passes through the website to external service providers, for example from a form, you should therefore clarify whether professional secrecy is affected.

Where health data arises in web analytics

The biggest risk on a healthcare website is rarely the analytics tool itself but what it picks up. Typical spots:

  • Addresses and parameters: a URL like /treatment/depression or /clinic/fertility says something about the person who opens it. Analytics scripts usually send the full address including parameters, and so does Logiwolf.
  • Site search: search terms such as symptoms or medicines often end up as a parameter in the URL, for example ?q= followed by the search word.
  • Appointment and contact forms: this is where visitors type in names, dates of birth and complaints. Forms that submit via GET even write the input into the address.
  • Campaign parameters: UTM parameters like utm_campaign=rheumatology-clinic link a visit to a topic. Make sure they never contain details about individuals.
  • Session recordings: a recording shows what a person saw and did on the page. They do not belong on pages with symptom checkers, medical history forms or appointment booking.

Checklist for practices, hospitals and pharmacies

  1. 1

    Sort your pages

    Separate general pages such as opening hours, team, jobs or directions from pages with a health context such as treatments, symptom checkers and appointment booking.

  2. 2

    Check the addresses

    Do diagnoses, names or search terms appear in addresses or parameters? Forms should submit via POST. If site search shows the terms in the URL, exclude the search pages from measurement.

  3. 3

    Place the pixel deliberately

    Do not add the pixel to pages with a health context in the first place. If appointment booking runs on its own subdomain or with an external provider, it stays out as long as you do not add the pixel there.

  4. 4

    Use recordings sparingly

    Record only where there is no health context. If that cannot be separated cleanly, do without recordings or mask every area that may contain patient data.

  5. 5

    Clarify the legal basis

    Check with your data protection adviser whether health data is involved. If so, express consent and possibly an impact assessment are required.

  6. 6

    Agreement and information

    Conclude a data processing agreement with the provider, name the tool, purpose, recipients and storage location in the privacy statement and offer a way to object.

What Logiwolf brings to the table

Logiwolf does not do the assessment for you, but it gives you tools to leave sensitive areas out:

  • You switch session recordings on per website. The heatmap code only loads on websites where you have enabled heatmaps.
  • Passwords and form fields are masked automatically in recordings. You mask further areas, for example names in a patient portal, with a CSS selector in the website settings. The page Session recordings shows how this looks.
  • Logiwolf sets no cookies.
  • The data is stored in Zurich and Geneva, and a data processing agreement under Art. 9 revFADP and Art. 28 GDPR is available.

What generally applies to web analytics in Switzerland, the EU and the UK is summarised in the guide to privacy-friendly analytics.

This overview is not legal advice. For healthcare websites it is worth having a specialist review your set-up.

Sources: Swiss Data Protection Act (FADP), Data Protection Ordinance, status 1 December 2025, FDPIC guideline on cookies and similar technologies, version 1.1, Canton of Solothurn, guide on release from professional secrecy, FDPIC, guide on processing personal data in the medical sector (2002). As of October 2026.

Frequently asked questions

Web analytics in healthcare: FAQ

Are pageviews on a practice website health data?
Not every pageview. Statistics on the opening hours page say nothing about anyone's health. As soon as an address, search term or form reveals a link to an illness or treatment, health data can arise. Clarify such cases with your data protection adviser.
Does a practice website need consent for web analytics?
It depends on what is measured. If health data is processed, any consent required must be express, and the FDPIC requires express prior consent for such processing. For general visitor statistics without a health context, private controllers must inform visitors and offer a way to object. Have a specialist review your specific case.
May I use session recordings on a hospital website?
Avoid them on pages with symptom checkers, medical history forms or appointment booking. On general pages, recordings help you find usability problems. Logiwolf masks form fields and passwords automatically, and further areas with a CSS selector.
What does professional secrecy have to do with my website?
Art. 321 of the Criminal Code protects what patients entrust to professionals. If such information passes through the website to external service providers, for example via a form, you should clarify whether that is permitted. Art. 62 FADP additionally punishes the intentional breach of professional confidentiality with a fine.
Is there FDPIC guidance for healthcare websites?
Not as far as our research shows. The cookie guideline has no specific rule for healthcare, but it treats processing of sensitive data as high-intensity processing. The older guide for the medical sector from 2002 does not cover tracking.
Free up to 2,000 pageviews · no credit card

Statistics with care.

Web analytics without cookies, hosted in Switzerland, with automatic masking in recordings.