Analytics on a health tech site
What can safely be measured, what cannot, and why the decision has to happen before the tag manager rather than after.
What is in this
I am not a lawyer and none of this is legal advice. It is what I do when building a marketing site for a company in health, and the reasoning behind it, which your counsel can then agree or disagree with.
The short version: the decision about what analytics may see has to happen before the tags go on. Afterwards it is an archaeology project, because the data has already been sent and you cannot unsend it.
What a URL can leak
Start here, because it is the one people do not expect. A URL is data, and it goes to every tool you have installed.
Every analytics script receives the page path. So does anything loaded through a tag manager. That is fine on /pricing. It is not fine on paths that a health site produces without anybody deciding to:
A results or portal page with an identifier in it. A condition-specific landing page reached after a quiz, where the path itself says what somebody answered. Anything with an email address in a query parameter, which happens the moment a link from an email carries the recipient's address for a prefilled form. A search results page where the query string is what the visitor typed into a symptom search.
The consequence is a rule that costs almost nothing at design time and is painful later: URLs on a health site carry categories, not people and not conditions tied to a session. Decide the URL structure with this in mind, because changing it afterwards is a migration.
Form fields and general-purpose tools
The second category, and the one where the tooling actively works against you.
Session recorders and heatmap tools capture what happens on the page, which on a form page means what was typed into it. Most of them offer field masking and most of them do not mask by default. A tool installed in an afternoon by somebody optimizing the conversion rate is a tool recording form input on a health site.
Tag managers are the other route. A tag manager is a mechanism for adding scripts without a developer, which is its purpose and its risk: the decision about what runs on your pages moves to whoever has access, and the list of people with access grows.
Then the third-party assumption nobody checks: a general-purpose analytics product is built for general-purpose sites. It is not designed around the constraint that some of the data it would happily collect must not reach it, and the vendor will not sign an agreement that says otherwise. That is not a flaw in the product; it is a mismatch with the use.
What can be measured, and what cannot
The distinction that actually matters is not "analytics good or bad". It is whether a measurement is about a person or about a page.
Where the line falls
Safe to measure
- Traffic to marketing pages, by source
- Conversion rate on a form, as a rate
- Scroll depth, clicks, page performance
- Campaign attribution up to the form
Not into a general-purpose tool
- Anything identifying who a visitor is
- Form field values, including by session replay
- URLs carrying a condition, a result or an identifier
- Events fired from inside a logged-in or intake flow
The thing worth noticing is how little the marketing team actually loses. "How many people who arrived from this campaign started the intake form" is a question the left column answers. "Which people" is the one it does not, and that question belongs in a system built to hold the answer, not in a web analytics product.
The seam is the handoff. Attribution is carried up to the point where the visitor becomes a patient, and it stops there. Everything after that belongs to systems with an agreement behind them.
Consent, and what it changes
Consent is necessary and it is not the answer to this.
A banner changes whether a tool may run for a visitor who declined. It does not change what the tool receives once it is running, and it does not make a URL containing a condition acceptable. A site that treats the banner as the control has solved a compliance requirement and left the actual problem in place.
What consent does change is your data. If a meaningful share of visitors decline, your numbers are a sample, and your year-on-year comparison spans a change in what was being counted. That is worth writing down at the time, because a year later it looks like a traffic decline.
A setup that is defensible
Five things. None is exotic and the order matters.
Write down what is being measured, before any tag is installed. A list of events with their properties, agreed by whoever owns the risk. This document is the deliverable; the implementation is downstream of it.
Keep the sensitive surfaces out of the general-purpose tools entirely. Intake, portals, anything behind a login. Not masked: absent. The marketing site and the product are different measurement problems with different requirements.
Strip query parameters at the edge. Anything that could carry an address or an identifier, removed before it is recorded rather than filtered after.
Put the tag manager behind a named owner. Not a lock, a person. The risk is not the tool, it is that nobody knows what is currently running.
Re-read the list every few months. Tools get added. The document is only useful if it still describes reality.
That is the whole practice, and it takes a meeting rather than a project. The cost of doing it up front is one conversation. The cost of not doing it is finding out that eight months of URLs went somewhere they should not have, and then having to explain it.
Webflow for health tech covers what these builds keep needing more broadly, including where the line between the marketing site and anything holding patient information gets drawn.
Also worth reading
-
Industry
The marketplace pages nobody builds
Every marketplace pours effort into the buyer journey and leaves the seller pages as an afterthought. Sellers are searching too, with less competition.
-
Industry
What B2B SaaS marketing sites keep getting wrong
Four patterns seen across enough of these builds to be a pattern rather than an anecdote, and what each costs.
-
Hiring
Red flags in a website quote
Six things that mean the number will change later, and the questions that surface them before you sign.
Reach out and see if we are a good fit.
Currently booking two to four weeks out.