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.
Example: 200 form leads in a month. With email in the URL, nearly every lead creates its own page path. Clean URLs give one.
- Visitor submits formName and email entered
- Redirect with query string/thanks?email=jane@example.com
- Tags fire on thank-you pagePage URL is sent as page_location
- 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
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.
Open DevTools, Network tab
Tick Preserve log, then filter by
collect,facebook,tr,googleadsordoubleclick.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
dlandpage_locationparameters.Check the address bar
If the thank-you page URL contains any form value, every tag on that page can pick it up.
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.
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.
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.
Review customer events and pixels
In Settings > Customer events, open each custom pixel and app pixel and check it does not send email or name in plain text.
Remove PII from URLs
Avoid putting email in links from newsletters or account pages that land on tracked pages.
Disable auto form tracking where not needed
In Variables > Configure, untick form variables you do not use, and review any Form Submission trigger that passes field values.
Strip PII with a custom variable
Create a Custom JavaScript variable that removes the query string or masks email patterns, then use it as the page location override in your GA4 tag fields.
Check the data layer
Make sure dataLayer pushes do not include raw email, name or phone fields.
Use a fixed success page
In Form Settings set 'Redirect URL' to a plain page and avoid appending form values with custom code.
Check custom code
Review Project Settings > Custom code for scripts that read input values and send them to pixels.
Check redirect URLs in forms and surveys
In the form's Settings, use a plain redirect URL without contact merge fields such as {{contact.email}}.
Review the tracking code
Check the funnel's Tracking code and Facebook pixel settings for scripts that pass contact values.
Use a plain thank-you message or page
In the form's settings, set the submit action to a message or a page without dynamic values.
Review Marketing integrations
Under Marketing > Marketing Integrations, check any Velo or custom tracking code that reads form fields.
Use the form's built-in message or a plain URL
In the form's Storage and Advanced settings, set the post-submit action to a message or a page with no parameters.
Check Code Injection
Review Settings > Advanced > Code Injection for scripts that send input values to pixels.
Redirect without values
Send visitors to a fixed URL after a POST, and keep the lead in the server session or a reference id instead of a query string.
Sanitise URLs before tracking
Strip sensitive parameters before the page location is sent, see the snippet below.
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]');
}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
- 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
- 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.
Related issues
- DLV-243Form posts over http or to a third-party domainFix guide
- DLV-245No consent checkbox or privacy link on the formFix guide
- DLV-246Consent record not stored with the leadFix guide
- DLV-247Deletion requests not propagated to CRM/ESPFix guide
- DLV-240Lead data emailed in plain text with sensitive infoFix guide
- DLV-248Data stored outside allowed region (GDPR)Fix guide