Skip to content

GA4Published 17 min read

Privacy-Safe Ad Tracking for Regulated Industries

How to measure ads for healthcare, finance and legal clients without sending sensitive data to Google or Meta, and how to document it so a compliance team can sign off.

Muhammad Qitmeer, founder of Augere Labs
Muhammad Qitmeer
Co-founder and CEO, Augere Labs
Share

Privacy-safe ad tracking means measuring conversions for a regulated client without letting sensitive information reach Google, Meta or any other ad platform. In practice that is four things: respect consent with a properly configured Consent Mode v2, strip anything sensitive from URLs, page titles and event parameters, use internal IDs instead of personal data where the client requires it, and write down exactly what is sent where so the client's compliance or legal team can approve it.

Key takeaways

  • The biggest leaks are not form fields. They are page URLs, page titles, search terms and event names that reveal a condition, a product or a financial situation.
  • Consent Mode v2 has four consent types (ad_storage, analytics_storage, ad_user_data, ad_personalization). A banner that never sends updates to Google is not a Consent Mode setup.
  • You can track conversions without email addresses: a click ID plus an internal, non-identifying reference is often enough for offline imports and Conversions API events.
  • Server-side tagging helps because you can filter data before it leaves your control. It does not make a setup compliant by itself, and it must never be used to get around consent.
  • The deliverable a regulated client actually needs is a tracking data spec their compliance team can read and sign off. This article includes a template.

One note before we start. We are tracking engineers, not lawyers. Nothing here is legal advice, and nothing here makes a client compliant with HIPAA, state privacy laws or any other regulation. What we can do is build tracking that sends as little as possible, test it, and document it clearly enough that the people who do make those calls can make them.

Why do regulated industries need a different tracking setup?

A standard tracking setup is designed to collect as much useful signal as possible. The Meta Pixel sends the full page URL with every event. GA4 records page titles and URLs by default. Enhanced conversions in Google Ads send hashed email addresses and phone numbers. For an ecommerce store selling shoes, that is usually fine within the store's privacy policy and consent setup.

For a healthcare provider, a lender or a law firm, the same defaults can expose information the client must not share. Consider what a URL alone can say:

  • /services/addiction-treatment/book tells an ad platform that this visitor is looking for addiction treatment.
  • /loans/debt-consolidation/apply?score=poor reveals a financial situation.
  • /practice-areas/dui-defense/contact suggests a legal problem.
  • A page title like "Book your HIV test" does the same job even if the URL is clean.

Attach that to a cookie or a hashed email, and the ad platform now holds a sensitive fact about an identifiable person. That is exactly the kind of data that regulators, and the ad platforms' own policies, are concerned with.

There is also a practical side. Google and Meta both restrict how sensitive categories can be used in advertising. If the platform decides a client's data looks sensitive, it may limit what that data can be used for, regardless of what the agency intended. A privacy-safe setup is how you keep measurement working within those limits instead of discovering them after the fact.

What data should never be sent to Google or Meta?

The exact list depends on the client and on what their compliance team decides. As a working default for healthcare, finance and legal clients, we treat everything below as off limits for ad platforms unless the client's compliance or legal team has explicitly approved it in writing.

DataWhere it hidesWhy it matters
Page URLs and pathsEvery Pixel event, every GA4 page_view, Google Ads tagsPaths often name a condition, service or product
Query parametersSearch results pages, filtered listings, form redirectsCan carry search terms, form answers, emails or IDs
Page titlesGA4 page_view (page_title), some Pixel setupsTitles describe the page in plain English
Form field valuesAutomatic form tracking, "advanced matching" features, custom dataLayer pushesSymptoms, income, case details, dates of birth
Site search termsGA4 enhanced measurement (view_search_results), URL parametersPeople search for exactly what they are worried about
Event and conversion namesCustom events like "book_ivf_consult"The name itself can reveal the sensitive fact
Referrer URLsPatient portals, booking tools, internal toolsThe previous page can be as revealing as the current one
Contact detailsEnhanced conversions, Meta advanced matching, CAPI user_dataHashing does not make data anonymous; it is still personal data

Two of these deserve a closer look.

Hashed is not the same as anonymous

Google and Meta both hash email addresses and phone numbers (SHA-256) before or on receipt, and that is often presented as a privacy feature. It protects the data in transit. It does not stop the platform from matching the hash to an account, which is the whole point of sending it. If the client has decided that contact details must not go to ad platforms, a hashed email is still a contact detail.

Event names leak more than people expect

We regularly see conversion actions named after the service: "Lead - Bariatric Surgery", "Application - Bad Credit Loan". Even if every parameter is clean, the event name tells the platform what the person did. Use generic names such as generate_lead, book_appointment or submit_application, and keep the service-level detail in your own CRM, where it belongs.

What do Google and Meta's own policies say about sensitive data?

Both platforms have policies on sensitive categories, and both have been tightening them. We describe them here at a general level; always read the current policy pages yourself, because details change.

Google

  • Personalized advertising. Google restricts advertiser-curated audiences (remarketing, Customer Match and similar) for sensitive interest categories, which include health and personal hardship topics among others. Advertisers in these categories can still use some of Google's own predefined audiences, but not their own lists.
  • Customer data policies. Google's customer data policies cover features like enhanced conversions and data uploads. They prohibit uploading certain data, including conversion information related to sensitive categories such as health or a person's negative financial status, and require that data is collected with proper disclosure and consent.
  • Google Analytics. Google's Analytics terms prohibit sending personally identifiable information to Analytics, and Google publishes best practices for keeping it out of URLs and page titles. GA4 also offers data redaction for web streams, which can remove email addresses on a best-effort basis and strip query parameters you name.

Meta

  • Business Tools Terms. Meta's terms for the Pixel, SDK and Conversions API say advertisers must not send certain information, including health and financial information and other sensitive categories.
  • Sensitive information filtering. Meta describes filtering that detects and blocks potentially sensitive information it receives, and it may restrict what data a dataset can share. Industry reports describe tiers of restriction for health and wellness advertisers, from limiting URL and custom parameter data through to limiting which events can be used for optimization. Check the client's Events Manager for any restriction notices.
  • Responsibility stays with the advertiser. Meta's position is that the business is in the best position to make sure its integration does not send prohibited information. Filtering on Meta's side is a safety net, not a plan.
  • The Conversions API is not a workaround. Server events are covered by the same terms as browser events. Moving a sensitive event to the server does not change what it says.

How do you set up Consent Mode v2 properly?

Consent Mode is how Google tags learn what the visitor agreed to. It has four consent types:

  • ad_storage: whether advertising cookies can be read or written.
  • analytics_storage: whether analytics cookies can be read or written.
  • ad_user_data: whether user data can be sent to Google for advertising.
  • ad_personalization: whether data can be used for personalized advertising such as remarketing.

The last two are the "v2" additions. For users in the EEA, Google requires advertisers to collect consent and pass consent signals to Google to keep using its measurement, ad personalization and remarketing features; Consent Mode v2 is the usual way to send those signals from Google tags. Even where it is not required, it is the cleanest way to make Google tags respect a banner.

Basic versus advanced

In basic Consent Mode, Google tags do not load until the visitor interacts with the banner. If they decline, nothing is sent to Google at all. In advanced Consent Mode, tags load with consent denied by default and send cookieless pings while consent is denied; full data is sent only once consent is granted. Advanced mode supports Google's conversion modeling more fully, but it does send some data before consent.

For regulated clients this is a decision for the client's compliance team, not for the media buyer. We explain both, document the difference in the data spec, and implement what they choose. Many regulated clients choose basic mode precisely because it sends nothing until consent.

The essential pieces

  1. A default state set before any Google tag fires. For EEA and UK visitors, the default is usually denied for all four types. Defaults can be set per region.
  2. An update when the visitor makes a choice in the banner, and again whenever they change it.
  3. A wait if the banner loads asynchronously. The wait_for_update setting tells Google tags how many milliseconds to wait for an update before sending.
  4. Non-Google tags handled separately. Consent Mode only controls Google tags. The Meta Pixel, LinkedIn, TikTok and any other vendor need their own consent checks, usually through GTM's consent settings or trigger conditions.

A minimal default, set in the page before GTM loads or through a consent template in GTM, looks like this:

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

  // Default: everything denied until the banner answers
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'analytics_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'wait_for_update': 500
  });
</script>

// Later, when the visitor accepts analytics only:
gtag('consent', 'update', {
  'analytics_storage': 'granted'
});

Most consent platforms (Cookiebot, OneTrust, CookieYes, Usercentrics and others) have GTM templates that set defaults and send updates for you. Use them, but test them. A template installed with the wrong region settings or a missing update call is the most common problem we find. Our Consent Mode v2 implementation guide walks through the setup in detail.

How to test Consent Mode

Test three states on every site, in a clean browser each time:

  1. No answer. Load the page and do not touch the banner. In Tag Assistant, the consent tab should show all types denied (or your configured default). In basic mode, no Google requests should be sent. In advanced mode, requests should carry denied consent states.
  2. Reject all. Click reject. Confirm the update shows denied, no advertising cookies are written, and non-Google tags such as the Meta Pixel do not fire.
  3. Accept all. Click accept. Confirm the update shows granted for every type and that tags fire normally.

Then repeat with a partial choice if the banner offers categories. Record each state with a Tag Assistant capture and the browser's network panel. That record goes into the test log you hand to the client.

Cookie banners that actually work

Most broken consent setups are not technically complicated. They are a banner that looks right but is not wired to anything. Things we check:

  • The banner loads before any marketing tag, not after a two-second delay that lets the Pixel fire first.
  • Hard-coded tags outside GTM (a Pixel pasted into the theme, a plugin that injects its own Google tag) are either removed or brought under the same consent logic.
  • "Reject" is as easy to find as "Accept", where the client's legal team requires it.
  • The banner's categories map cleanly to tags. If the banner has "Marketing" and "Analytics", each tag in GTM should be tied to one of them.
  • The choice persists across pages and across subdomains where the booking or application flow lives elsewhere.
  • Region rules match what compliance asked for, rather than whatever the template shipped with.

Which banner design and which regions are required is a legal question. Whether the banner actually does what it says is a tracking question, and that part we can test.

How do you track conversions without sending personal data?

This is the question regulated clients ask most: can we still measure leads and optimize ads if we do not send emails or phone numbers? Usually yes, with less match quality than a setup that sends everything, and that trade-off should be explicit.

Google Ads: click ID and internal references

Google Ads offline conversion imports can work with the Google click ID (GCLID) captured when the visitor lands, stored with the lead in the CRM, and sent back when the lead becomes a qualified lead or a customer. No email or phone number is required for a GCLID-based import. Enhanced conversions for leads, by contrast, rely on hashed contact details, so skip it if the client has ruled those out.

The GCLID is still an identifier linked to an ad click, so it belongs in the data spec. But it does not name the person or their condition, and many compliance teams are comfortable with it when it is documented. That is their call.

Meta: Conversions API without email

Meta's Conversions API accepts several customer information parameters. Email and phone are the strongest for matching, but they are not required. A minimal privacy-conscious server event might carry:

  • external_id: an internal reference you generate, such as a random lead ID that means nothing outside the CRM. Meta recommends hashing it.
  • fbc: the click ID from the _fbc cookie, when the visitor came from a Meta ad and consented.
  • fbp: the browser ID from the _fbp cookie, when consented.
  • client_user_agent, which Meta requires for website events sent through the Conversions API, and possibly client_ip_address, if compliance allows it. Neither is hashed.
{
  "data": [{
    "event_name": "Lead",
    "event_time": 1764752400,
    "event_id": "lead_8f3a2c91",
    "action_source": "website",
    "event_source_url": "https://example-clinic.com/contact",
    "user_data": {
      "external_id": ["(sha256 of internal lead reference)"],
      "fbc": "fb.1.1764752000000.AbCdEf",
      "fbp": "fb.1.1764751000000.123456789",
      "client_user_agent": "(visitor browser user agent)"
    }
  }]
}

Note what is missing: no email, no phone, no name, no service-specific URL, and a generic event name. The event_source_url points to a neutral contact page; on a site where every form sits on a service page, you would replace it with a neutral value or the bare domain. Match quality will be lower than with an email, and Event Match Quality in Events Manager will show it. Our guide to Meta event match quality explains what each parameter contributes, so you can show the client what they are trading.

Whether even cookie IDs and IP addresses are acceptable is, again, a compliance decision. Some clients will allow click IDs but not IP addresses. Some will not allow Meta at all on certain pages. Build the setup to match the decision, not the other way round.

Example

An illustrative dental group runs Google and Meta ads to a booking page. Compliance approves: generic event names, click IDs, and an internal booking reference. Compliance rejects: emails, phone numbers, treatment names and URLs below the domain on treatment pages.

  1. Every treatment page fires a generic page_view with the page location rewritten to the bare domain.
  2. The booking form fires book_appointment with no form values in the dataLayer.
  3. The CRM stores the GCLID, fbc and a random booking reference with the appointment.
  4. When the appointment is attended, the CRM sends an offline conversion to Google Ads keyed on GCLID, and a CAPI event to Meta with the hashed booking reference as external_id.

Nothing in this flow tells either platform what treatment the person booked. The numbers and rules here are illustrative; a real client's compliance team sets them.

What does server-side filtering add?

With standard browser tags, each vendor's script collects what it collects, and you have limited control. With server-side Google Tag Manager, the browser sends events to a server container on the client's own subdomain, and the server container decides what to forward to each platform.

That gives you a place to enforce rules:

  • Rewrite page_location and page_referrer to remove paths or query parameters before forwarding.
  • Drop page_title entirely.
  • Remove IP addresses or user agents for platforms where compliance has not approved them.
  • Allow only an approved list of parameters per platform, and drop everything else by default.
  • Block events entirely when consent is denied, regardless of what the browser sends.

Two cautions. First, server-side tagging is a control point, not a compliance badge. A server container that forwards everything is no safer than browser tags. Second, server-side tagging must respect consent. Using it to send data that the visitor refused in the banner, or to get around ad blockers for people who opted out, is the wrong use of the tool, and we will not build that.

Diagram

Suggested diagram: a left-to-right flow. Browser (consent banner, GTM web container) sends events to a server container on a first-party subdomain. Inside the server container, a "filter" box shows three actions: strip URL path and query, drop page title, allow-list parameters. Arrows then go out to Google Ads, GA4 and Meta, each labelled with the short list of fields it receives. A red dashed arrow from the browser straight to Meta is crossed out. Alt text: "Diagram of a privacy-safe tracking flow where a server-side container strips sensitive fields before forwarding events to Google Ads, GA4 and Meta."

If you are weighing whether a client needs server-side tagging at all, our article on whether server-side tracking is worth it covers the costs and maintenance honestly, and the server-side Google Tag Manager setup guide covers the build.

US state privacy laws: what agencies should know

This section is general awareness only. It is not legal advice, the landscape changes often, and every point should go to the client's legal or compliance team before you act on it.

  • HIPAA applies to covered entities (such as healthcare providers and health plans) and their business associates. Whether a given client, and their vendors, fall under it is a legal determination. The US Department of Health and Human Services has issued guidance on online tracking technologies, and it has been challenged in court. In June 2024 a federal district court in Texas (American Hospital Association v. Becerra) vacated the part covering tracking on public, unauthenticated pages, and HHS withdrew its appeal later that year. Other parts of the guidance were not vacated, so check the current HHS page and ask compliance how it applies.
  • State comprehensive privacy laws. California's CCPA, as amended by the CPRA, and a growing number of other states have consumer privacy laws that cover targeted advertising, "sale" or "sharing" of personal information, and sensitive data. Rules on opt-outs and on sensitive data differ by state.
  • Consumer health data laws. Some states have passed laws aimed specifically at consumer health data outside HIPAA, with Washington's My Health My Data Act the best known example. These can reach businesses that are not covered by HIPAA.
  • Financial services clients may have obligations under federal financial privacy rules such as the Gramm-Leach-Bliley Act, plus their regulators' expectations.
  • Opt-out signals. Some state laws, including California's, require businesses to honor browser-based opt-out preference signals such as Global Privacy Control. If compliance says GPC must be honored, the consent setup has to read it.

Our job here is to ask the right questions early: which laws does compliance consider in scope, which data categories are restricted, and which vendors are approved. The answers become requirements in the data spec.

How do you write a tracking data spec a compliance team can approve?

A compliance or legal reviewer does not want to read a GTM export. They want to know, in plain language, what leaves the website, where it goes, and why. A tracking data spec answers that in one document.

We build it as a table with one row per event per destination, plus a short header section. Here is the template we start from:

EventTriggerDestinationFields sentIdentifiersFields removedConsent requiredPurposeApproved by / date
page_viewEvery page loadGA4Page location (domain only on service pages), timestampGA client ID (cookie)Page title, query parameters, path on service pagesanalytics_storageSite usage reporting
generate_leadContact form successGoogle AdsConversion action, timestampGCLID (cookie)All form values, email, phonead_storage, ad_user_dataCount ad-driven leads
LeadContact form successMeta (Pixel + CAPI)Event name, event ID, neutral source URLfbc, fbp, hashed internal lead ID, browser user agent (required by Meta)Email, phone, name, IP addressMarketing categoryCount ad-driven leads, deduplicate
Qualified lead (offline)CRM stage changeGoogle AdsConversion action, time, valueGCLIDLead details, service typeRecorded at captureOptimize to qualified leads

Above the table, the spec should state:

  • The vendors in scope (Google Ads, GA4, Meta and any others) and the accounts or IDs.
  • The consent platform, the consent mode chosen (basic or advanced) and the regional defaults.
  • Any global rules, such as "no page titles are sent to any vendor" or "no URLs below the domain on pages under /services/".
  • Where the setup lives: GTM container IDs, server container URL, CRM fields.
  • How changes are controlled: who can publish GTM, and that any new tag requires an update to this spec.

Below it, attach the test log: consent state captures, outgoing request inspections showing the removed fields really are removed, and the date of each test. Then send it to compliance with a direct question: which rows are approved, and what needs to change?

The spec is also what keeps the setup safe later. When a new campaign manager wants to add a TikTok pixel or a heatmap tool, the rule is simple: new row, new review.

A privacy-safe ad tracking checklist

  1. Inventory every tag on the site, including hard-coded ones outside GTM.
  2. Capture outgoing requests to each vendor and list every field sent.
  3. Flag sensitive URLs, page titles, search terms, form values and event names.
  4. Agree data rules with the client's compliance or legal team.
  5. Configure Consent Mode v2 defaults and updates, and consent checks for non-Google tags.
  6. Rename conversion events to generic names.
  7. Strip or rewrite sensitive fields, in the web container or a server container.
  8. Replace contact details with click IDs and internal references where required.
  9. Test every consent state and inspect the outgoing requests again.
  10. Write the data spec, attach the test log, and get sign-off.
  11. Re-test after every site change, and review the spec at least quarterly.

This is the work we do on our privacy and consent service, under your agency's brand. We document everything and leave the legal decisions with the people who are qualified to make them.

Guides in this cluster

More guides on privacy-safe tracking are being added to this cluster.

Want us to check one of your client accounts? Get a free tracking check →

Just one quick fix, not a whole account? Our founder takes small fixed-price jobs on Fiverr: GA4 and Google Tag Manager tracking fix

Frequently asked questions

Does privacy-safe tracking make a client HIPAA compliant?

No. No tracking setup can make a client compliant on its own, and we do not claim certifications. Privacy-safe tracking reduces what is sent to ad platforms and documents it, so the client's compliance or legal team can decide whether it meets their obligations.

Can you run Meta Conversions API without sending email addresses?

Yes. Email and phone are optional customer information parameters. You can send an event with a hashed internal ID, click and browser IDs where consented, and a generic event name, accepting lower match quality.

Is server-side tracking required for regulated clients?

Not always. It is useful because it gives you one place to filter data before it reaches each platform, but a careful web container setup can be enough for simpler sites. It never replaces consent.

Should regulated clients use basic or advanced Consent Mode?

That is a decision for the client's compliance team. Basic mode sends nothing to Google until consent is given; advanced mode sends cookieless pings while consent is denied, which supports more modeling.

What is a tracking data spec?

A plain-language document listing every event, where it is sent, which fields and identifiers it carries, what is removed, and which consent it requires. It is what a compliance team reviews and approves.

Muhammad Qitmeer

Written by

Muhammad Qitmeer, founder of Augere Labs

Augere Labs is the white-label tracking partner behind marketing agencies. If a client account has numbers you don't trust, I'm happy to look at it with you and tell you straight what's wrong.

Connect on LinkedIn