Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Personal data in URLs or analytics: how to find and fix it

OPS-336High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Personal data (also called PII, personally identifiable information) is anything that points to a real person: an email address, full name, phone number, postcode with a name, or an order ID that links to a customer record. This issue happens when that data ends up in a URL, a page title or a tracking event parameter.

Analytics and ad tags usually record the full page address automatically. So if your form redirects to /thank-you?email=jane@example.com, the address, and the email in it, is sent to every tool on that page.

Example of a leaking URLtext
https://example.com/thank-you?name=Jane+Smith&email=jane%40example.com&phone=07700900123

Common sources are forms that submit with GET, thank-you pages that echo form values, email links with the address in the query string, site search boxes where people type their own details, and tags that pass raw form fields as event parameters.

Why it costs you leads or sales

This is mainly a legal and platform risk, but it hits revenue too. Under GDPR and UK GDPR, sending personal data to a third party without a lawful basis and a notice can lead to complaints and fines. Google Analytics terms forbid sending PII to GA, and ad platforms can reject or limit data that breaks their policies.

How an email leaks from a form
  1. Visitor submits formEnters name and email
  2. Redirect with GET params/thank-you?email=jane@example.com
  3. Tags read the URLGA4, Google Ads, Meta record page_location
  4. Data stored by vendorsEmail sits in reports and logs

The leak happens at the redirect; everything after it receives the personal data.

How to check if your site has it

Manual check in about 15 minutes
  1. Submit your own forms

    Use a test name and a test email like test+pii@yourdomain.com. Watch the address bar on the thank-you page.

  2. Open browser developer tools

    Go to the Network tab and filter for collect, g/collect, facebook.com/tr, googleadservices and doubleclick. Search the request details for your test email, name or phone.

  3. Check GA4 reports

    In Reports > Engagement > Pages and screens, switch the primary dimension to Page path + query string and search for @, email=, name= and phone=.

  4. Check GTM PreviewGoogle Tag Manager

    In Tag Assistant, click each event and inspect Variables such as Page URL, Page Title and any custom data layer values for personal data.

  5. Check search and email links

    Search your site for a test term that looks like an email and look at the search results URL. Click links in your own marketing emails and check the landing URL.

How to fix it

Fix it in this order: stop creating the URL, then stop tags from sending the data, then clean up what is already stored.

Remove personal data at the source
  1. Use a neutral thank-you page

    In your form plugin (Gravity Forms, WPForms, Contact Form 7, Fluent Forms and similar), set the confirmation to a fixed page URL, not one that appends field values with merge tags.

  2. Remove merge tags from redirect URLs

    Delete any {email} or {name} style tags in the redirect or query string settings.

  3. Check form method

    Custom forms should use method="post", not GET.

GTM Custom JavaScript variable: strip sensitive parameters from the URLjavascript
function() {
  var url = new URL(document.location.href);
  var blocked = ['email','e-mail','mail','name','first_name','last_name','phone','tel','fullname'];
  blocked.forEach(function(p) { url.searchParams.delete(p); });
  return url.toString();
}
Clean up what is already stored
  1. Stop the leak first

    Publish the fixes above before cleaning, otherwise new data keeps arriving.

  2. Delete affected data

    In GA4, use the data deletion request option under Admin > Data collection and modification > Data deletion requests. For ad platforms, follow each vendor's data deletion process.

  3. Record what happened

    Note what leaked, for how long and what you did. Ask your privacy lead or adviser whether it needs to be treated as a data incident.

Thank-you page URL and tracking

Before

  • /thank-you?email=jane@example.com
  • Page title: Thanks, Jane
  • Email appears in GA4 and ad platform requests

After

  • /thank-you
  • Page title: Thank you
  • Tags send only event name and non-personal values

How to confirm it's fixed

Confirmation checklist
  • Submit each form with a test email and name; the thank-you URL has no personal values
  • Network tab shows no test email, name or phone in any tracking request
  • GTM Preview shows cleaned page_location in GA4 and other tags
  • GA4 Pages and screens report shows no new URLs containing @ or email=
  • Page titles on thank-you and account pages are generic
  • Email marketing links no longer include the subscriber's address

How to prevent it happening again

Leaks usually return after a new form, a theme change or a new marketing tool. Put these habits in place.

Prevention habits
  • Add "no personal data in URLs or events" to your launch checklist for every form and campaign
  • Review new tags and data layer values before publishing in GTM
  • Keep one cleaned URL variable and reuse it in all tags
  • Use opaque IDs or tokens in links, never emails
  • Re-test every form after plugin, theme or CRM changes
  • Run an automated check on a schedule
Where leaks typically come fromExample numbers
Where leaks typically come from (example)Thank-you redirects: 45 %; Email links: 25 %; Event parameters: 20 %; Site search: 10 %0173445252010Thank-you redirectsEmail linksEvent parametersSite search%

Example: illustrative split of leak sources found in an audit, not real data.

How FunnelGuard handles this

FunnelGuard detects this issue today. Its robot visitor runs your real journeys, such as a lead form, using clearly marked test details. A check called no_pii_in_tracking looks at the tracking hits sent to ad and analytics platforms during the run and flags personal data that shows up in them.

If a failure is found, it is re-checked from a second region before one alert goes out (email, Slack, Teams, WhatsApp, webhook or PagerDuty) with a screenshot and a likely cause. FunnelGuard checks the journeys you set up, so it will not see leaks on pages or forms it does not run. It does not delete data already stored by vendors. You can start with the Free plan (1 site, 2 journeys, daily checks, no card), or try a paid plan free for 3 days.

Questions people ask

Why is there an email address in my GA4 page URLs?

Most often a form redirects to a thank-you page with the email added to the query string, or an email campaign link includes the subscriber's address. GA4 records the full page URL automatically, so the email is stored. Fix the redirect or link, then request deletion of the affected data.

Is personal data in URLs a GDPR problem?

It can be. Sending names or emails to analytics and ad vendors is processing personal data, which needs a lawful basis, notice and often consent. Many people never intended this, which is why it is a common finding. Ask your privacy adviser how it applies to you.

How do I remove PII from Google Analytics 4?

First stop new data by removing personal values from URLs and tags. Then use Admin > Data collection and modification > Data deletion requests to delete affected data. Redacting parameters in GTM before they reach GA4 helps stop repeats.

How do I find personal data in my tracking requests?

Submit a form with a unique test email, open the browser Network tab and search each tracking request for that email, name or phone. Also search GA4 page paths for @, email= and phone=. GTM Preview shows the values each tag will send.

Can I use a thank-you page without putting data in the URL?

Yes. Redirect to a fixed URL such as /thank-you and fire your conversion event on that page. If the page needs context, use a random token or reference ID, not the visitor's details.

Is sending hashed emails to Google Ads or Meta the same problem?

No. Enhanced conversions and advanced matching send hashed data deliberately through a supported feature, and you should have consent and disclose it in your privacy policy. The issue here is raw personal data sent by accident through URLs or parameters.

Does FunnelGuard check for personal data in tracking?

Yes. Its no_pii_in_tracking check inspects the tracking hits sent during a scheduled journey and flags personal data. It covers only the journeys you set up and does not clean data already stored by platforms.

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.