On this page
What this issue is
Some forms and checkouts redirect to a page like /thank-you?first_name=Jane&last_name=Doe&street=12+High+St. The data is in the query string, the part of a URL after the question mark. It is used to greet the visitor or prefill a booking page.
- Form submittedVisitor enters name and address
- Redirect with data/thanks?name=Jane&street=...
- Pixels fireGA4, Meta, Google Ads read the full URL
- Data stored by vendorsPersonal data sits in reports and logs
The leak happens on the thank-you page load, before anyone sees a problem.
Why it costs you leads or sales
How to check if your site has it
Submit your own form with test data
Use a fake name and address such as Test Person, 1 Test Street.
Read the address bar on the thank-you page
If you see your test name, email or address after a question mark, the URL carries personal data.
Open DevTools, Network tab
Filter for
collect,tr,facebookorgoogleads. Look in each request fordl=(GA4) ordlandrl(Meta) containing your test data.Check GA4 DebugViewGoogle Tag Manager
Open Admin > DebugView, then inspect the page_view event and its page_location parameter.
How to fix it
Find the redirect setting
In your form plugin (Contact Form 7, Gravity Forms, WPForms, Elementor Forms and others) open the confirmation or redirect settings.
Remove merge tags from the URL
Change
/thank-you?name={name}to/thank-you. In Gravity Forms, untick pass-through query string fields.Show the name on the page instead
Use the plugin's confirmation message with merge tags, which renders on the page but does not enter the URL.
Set a fixed redirect
In the form settings, set the Redirect URL to a plain path such as /thank-you with no query string.
Avoid custom scripts that append values
Check Project Settings > Custom Code for scripts that add form values to the redirect.
Edit the form's on-submit action
In Sites > Forms, set the redirect to a clean URL without contact merge fields.
Check funnel step redirects
Inspect any workflow or button link that includes custom values like {{contact.first_name}} in the URL.
Add a stop-gap, not a cure
Create a Custom JavaScript variable that returns the URL without its query string and use it as the page URL in GA4 and ad tags. Fix the redirect too, because other scripts can still read the URL.
Redirect without data
Send users to a fixed URL and store the submission server-side, keyed to a session or random ID.
Replace the URL after load if needed
As a last resort, call history.replaceState before tags load. This is fragile, so fix the redirect.
function() {
return {{Page URL}}.split('?')[0].split('#')[0];
}Before
- /thank-you?name=Jane+Doe&street=12+High+St
- Every visitor creates a unique page URL
- Pixels store personal data
After
- /thank-you
- One page URL for all visitors
- Pixels receive no personal data
How to confirm it's fixed
- Submit the form with fake data and confirm the thank-you URL has no personal values.
- In DevTools Network, no tracking request contains your test name or address.
- GA4 DebugView shows page_location without personal data.
- The conversion event still fires once on the thank-you page.
- Old URLs with personal data are no longer linked or reachable from the form.
How to prevent it happening again
| Source | Typical cause | Safer option |
|---|---|---|
| Form plugin redirect | Merge tags in redirect URL | Fixed redirect URL |
| CRM or funnel builder | Contact fields in button links | Use on-page merge fields |
| Custom scripts | Appending form values to location | Server-side session or random ID |
| Payment return URL | Customer details in return query | Order ID only, looked up on the server |
How FunnelGuard handles this
Questions people ask
Why is my thank-you page URL showing the customer's name?
Your form or funnel builder is redirecting with form values added to the query string, often through merge tags or a custom script. Change the redirect to a fixed URL and show the name on the page itself if you need it.
Do Meta Pixel and GA4 collect the full page URL including parameters?
Yes. GA4 records the full address as page_location, and Meta Pixel sends the page URL with its events. Any personal data in the query string is sent along with them unless you remove it.
Is it a GDPR problem to have a name in the URL sent to Google Analytics?
It can be. Personal data sent to an analytics or ad vendor needs a lawful basis and proper consent, and vendor terms forbid sending PII. Removing it from the URL avoids the problem. Ask a privacy professional about your specific case.
How do I remove query parameters from the URL sent to GA4?
The best fix is to stop the redirect adding them. As a stop-gap, use a GTM variable that returns the URL without the personal keys and use it in your tags. Keep gclid and UTMs if you need attribution.
How can I show the customer's name on the thank-you page without putting it in the URL?
Use your form tool's on-page confirmation message with merge tags, or store the submission on the server and look it up with a random session ID. The visible page can then greet them while the URL stays clean.
How do I check if my thank-you page leaks personal data?
Submit your form with fake details, then check the address bar and the DevTools Network tab for tracking requests that contain them. Automated monitoring such as FunnelGuard can run this check on a schedule.
Will removing parameters break my conversion tracking?
Not if your conversion fires on a fixed thank-you path. It usually gets more reliable, because every visitor now lands on the same URL. Test after the change to confirm the event still fires once.
Related issues
- TRK-355Email address in page URL query string sent to GA4Fix guide
- TRK-356Phone number in event parametersFix guide
- TRK-358Form field values sent in GA4 click textFix guide
- TRK-359PII in page_title ("Thanks John")Fix guide
- TRK-360PII in dataLayer pushed to all vendorsFix guide
- TRK-361Hashed PII sent without consentFix guide