Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Lead PII leaked to analytics or ad pixels: how to find and fix it

DLV-244High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

PII means personally identifiable information: anything that points to a real person, such as an email address, full name, phone number or postal address. Analytics and ad platforms are not meant to receive it unless you have set it up on purpose (for example hashed data for enhanced conversions).

A leak happens when that data travels in a tracking request by accident. Common routes are: a thank-you page URL like /thanks?email=jane@example.com, a form plugin that redirects with the fields in the query string, a page title or custom event that includes the name, and pixels with automatic form field matching or autocapture switched on.

Why it costs you leads or sales

The risk is mostly legal and trust related. Google's analytics terms forbid sending PII to GA4, and privacy law such as GDPR expects you to know who receives personal data and why. A leak can lead to deleted data, suspended accounts or ad platform warnings, plus awkward questions from customers or regulators.

Unique thank-you page URLs in analyticsExample numbers
Unique thank-you page URLs in analytics (example)Email in URL: 200 URLs; Clean URL: 1 URLs0771532001Email in URLClean URLURLs

Example: 200 form leads in a month. With email in the URL, nearly every lead creates its own page path. Clean URLs give one.

How a form leaks personal data
  1. Visitor submits formName and email entered
  2. Redirect with query string/thanks?email=jane@example.com
  3. Tags fire on thank-you pagePage URL is sent as page_location
  4. Platforms store the dataGA4, Meta, Ads hold the email

The leak happens at the redirect, and every tag on the next page copies it.

How to check if your site has it

Find PII in tracking requests
  1. Submit a test lead with a recognisable email

    Use something like test+pii@yourdomain.com and a fake name so it is easy to search for.

  2. Open DevTools, Network tab

    Tick Preserve log, then filter by collect, facebook, tr, googleads or doubleclick.

  3. Search the requests for your test values

    Use the Network search (Ctrl/Cmd+F) for the email, the name and the phone. Check the URL, query string and payload of each hit, including the dl and page_location parameters.

  4. Check the address bar

    If the thank-you page URL contains any form value, every tag on that page can pick it up.

  5. Check GA4 DebugView and your pixel's test tool

    Look at event parameters, page location and user properties for personal values.

How to fix it

Fix the source first (stop putting PII in URLs and events), then clean what tags collect. Which setting you change depends on your platform.

Stop PII reaching tracking tags
  1. Switch the form to a message or fixed thank-you URL

    In your form plugin's confirmation settings choose 'Show message' or redirect to a plain page URL, and remove merge tags like {email} from the redirect address.

  2. Check plugins that add tracking

    Review any analytics, Meta or CRM plugin for options such as 'track form field values' or 'send user data' and turn them off unless intended.

GTM Custom JavaScript variable: page URL with email removedjavascript
function () {
  var url = new URL(window.location.href);
  ['email', 'e', 'name', 'first_name', 'last_name', 'phone', 'tel'].forEach(function (p) {
    url.searchParams.delete(p);
  });
  return url.href.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g, '[redacted]');
}
Thank-you page and tracking hit

Leaking

  • URL: /thanks?email=jane@example.com
  • GA4 page_location contains the email
  • Pixel autocapture reads form fields

Clean

  • URL: /thanks
  • page_location has no personal values
  • Only intended, hashed identifiers are sent with consent

How to confirm it's fixed

Re-test checklist
  • Submit a new test lead with a unique email and name.
  • The thank-you page URL has no form values.
  • Searching the Network tab for the email, name and phone returns no tracking requests.
  • GA4 DebugView shows clean page_location and event parameters.
  • Pixel test tools show no plain-text personal fields.
  • The lead still reaches your inbox and CRM.

How to prevent it happening again

Habits that keep PII out
  • Never build redirect URLs from form fields.
  • Keep a short list of what each tag is allowed to send.
  • Review pixel settings such as autocapture and advanced matching when a new tool is added.
  • Re-test after form plugin, theme or tag manager changes.
  • Run an automated check on a schedule, not just at launch.

How FunnelGuard handles this

FunnelGuard detects this today with its no_pii_in_tracking check. A robot visitor runs your real form journey with a test lead, and the check looks at the tracking hits sent to platforms such as GA4, Google Ads and Meta for the test lead's personal values. If it finds them, you get one alert with a screenshot and a likely cause. A failure is re-checked from a second region first.

Test traffic is marked (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent). It cannot see leaks that only occur for real visitors with different data or consent choices, and it does not clean up data already stored. The Free plan covers 1 site and 2 journeys with daily checks, no card needed, and a free read-only audit is available.

Questions people ask

Why is my email address showing up in Google Analytics?

Most often the thank-you page URL contains it, for example /thanks?email=jane@example.com, and GA4 records the URL as page_location. It can also come from a custom event or data layer push that includes form values. Check the Network tab for your test email to find which.

Is it against Google Analytics rules to send PII?

Yes. Google's terms for Analytics prohibit sending data that identifies an individual, such as emails, names or phone numbers, in plain text. Hashed data sent through features designed for it, like enhanced conversions, is handled differently.

How do I remove PII from GA4 URLs?

Stop adding it to URLs at the source by using a fixed thank-you page. You can also override the page location in your GA4 tag with a variable that strips sensitive query parameters. Past data needs a deletion request in GA4 admin.

Does the Meta pixel collect form data automatically?

It can. Meta's automatic advanced matching and some form autocapture settings read fields such as email and send them, hashed, to Meta. If you do not want this, turn the setting off in Events Manager and make sure you have consent where required.

How do I check if my forms send personal data to pixels?

Submit a test lead with a unique email, open the browser's Network tab and search for that email across all requests. Any tracking request that contains it in plain text is a leak. Also check the thank-you page URL.

Can a form plugin cause PII to leak into analytics?

Yes. Some plugins redirect to a thank-you URL with merge tags for the fields, or include entry data in events. Change the confirmation to a message or a plain URL and review any tracking add-ons.

Can FunnelGuard detect PII in tracking requests?

Yes. Its no_pii_in_tracking check submits a marked test lead and inspects the tracking hits for the test lead's personal values, then alerts you with a screenshot and likely cause. It checks the journeys you set up, not every real visitor.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: no_pii_in_tracking.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.