Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Meta Pixel advanced matching sending unhashed data in URL: fix

TRK-184High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Meta's advanced matching lets you send customer details such as email (em), phone (ph) and name with an event, so Meta can match the event to a person. Meta requires these values to be hashed with SHA-256. When you use the Pixel's own fbq('init', ...) advanced matching or its automatic option, the Pixel hashes the values for you.

Example of a leaking request (illustrative)text
https://www.facebook.com/tr/?id=123456789012345&ev=Lead
  &dl=https://example.com/thank-you?email=jane@example.com&phone=+441234567890
  &ud[em]=jane@example.com

Why it costs you leads or sales

Leaked personal data is a compliance and account risk, not just a tidy-up. Sending plain-text emails or phone numbers to an ad platform without a proper legal basis can breach privacy laws such as GDPR, and Meta may flag or drop events that contain data it should not receive. If events are dropped, your campaigns lose conversion signals and optimise on less data.

How the leak happens
  1. Visitor submits formEmail and phone entered
  2. Data added to URLGET form or redirect adds ?email=...
  3. Pixel firesSends page URL with plain text
  4. Other tags and logsAnalytics, logs and history store it

The form data travels in the URL, so every tag on the next page can read it.

How to check if your site has it

Look for personal data in Pixel requests
  1. Submit a test lead

    Use a fake email like test+pixel@example.com and a fake phone number so you can spot them easily.

  2. Open the Network tab

    In Chrome, press F12, open Network and filter by facebook.com/tr.

  3. Inspect each request

    Check the query string and the dl (page URL), rl (referrer) and ud[...] parameters. Hashed values are 64 hexadecimal characters. Anything readable like your test email is a leak.

  4. Check the address bar

    After submitting, see whether the thank-you URL contains an email, phone or name. If it does, every tag on that page sees it.

  5. Use Meta Pixel Helper

    The Chrome extension shows the advanced matching fields sent. Hashed values should appear as long strings, not readable text.

How to fix it

There are two parts: remove personal data from URLs, and make sure anything sent for advanced matching is hashed. Start with the URL, because that is the most common cause.

Fix by platform
  1. Set the form to POST

    In your form plugin, make sure the form method is POST, not GET, and that the redirect after submit does not append field values.

  2. Remove field merge tags from redirects

    If your plugin's confirmation redirect URL includes tags like {email}, delete them.

  3. Review the Pixel plugin

    In your Meta Pixel plugin settings, check the advanced matching option. Use the plugin's built-in matching instead of custom code that sends raw values.

Advanced matching via the Pixel (it hashes for you)javascript
fbq('init', 'YOUR_PIXEL_ID', {
  em: 'jane@example.com',
  ph: '441234567890'
});
fbq('track', 'Lead');
Hash an email with SHA-256 before sending server-side or by handjavascript
async function sha256(value) {
  const data = new TextEncoder().encode(value.trim().toLowerCase());
  const buf = await crypto.subtle.digest('SHA-256', data);
  return Array.from(new Uint8Array(buf))
    .map(b => b.toString(16).padStart(2, '0')).join('');
}
Clean up after the fix
  1. Stop the data going to analytics

    Add exclusion rules in your analytics tool for query parameters like email and phone, and ask for removal of stored data where needed.

  2. Turn off automatic matching if you do not need it

    In Meta Events Manager, open your Pixel > Settings and review the automatic advanced matching toggle and which fields it uses.

Before and after

Leaking

  • Thank-you URL contains ?email=jane@example.com
  • Pixel request shows readable email
  • Same URL stored in analytics and logs

Fixed

  • Thank-you URL is clean
  • Pixel sends 64-character hashed values
  • No personal data in analytics URLs

How to confirm it's fixed

Confirmation checks
  • Submit a fresh test lead and watch the address bar: no email, phone or name in the URL
  • In the Network tab, facebook.com/tr requests show no readable personal data
  • ud[em] and ud[ph] values are 64 hexadecimal characters
  • Meta Pixel Helper shows no warnings about advanced matching
  • Events Manager still receives the Lead event, with matching fields shown as received
  • Analytics reports no longer list URLs with personal data

How to prevent it happening again

Prevention habits
  • Never put personal data in URLs or query strings, whether in forms, redirects or emails
  • Use POST for any form that collects personal data
  • Review tag changes in GTM or your CMS before publishing
  • Test with a fake email after every form, theme or plugin change
  • Use the Pixel's or server library's built-in hashing rather than custom code
  • Run a scheduled check so a new leak is caught quickly
How an unnoticed leak unfolds (example)
  1. Day 1

    A form plugin update switches the redirect to include {email}.

  2. Day 2

    Every thank-you page view sends the email to the Pixel and analytics.

  3. Week 3

    Someone spots emails in an analytics report.

  4. Week 3

    Redirect cleaned, exclusion rules added, checks scheduled.

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor runs your real journey on a schedule, such as a lead form, and the no_pii_in_tracking check looks at the tracking requests sent to ad and analytics platforms for personal data in plain text, such as the test email or phone number in a request URL.

Questions people ask

Why is my email address showing in the Meta Pixel request URL?

Usually because the email is in the page URL, for example from a GET form or a redirect that adds ?email=. The Pixel reports the page URL with each event, so the email goes with it. Remove personal data from URLs and the leak stops.

Does Meta Pixel hash advanced matching data automatically?

Yes, when you pass values through the Pixel's own advanced matching (init parameters or the automatic option), it hashes them with SHA-256 before sending. It cannot clean up data that you put in the URL or in a custom call yourself.

How do I hash an email for the Meta Pixel or Conversions API?

Trim the email, convert it to lowercase, then hash it with SHA-256 and send the 64-character hexadecimal result. For the browser Pixel, you can pass the raw value to advanced matching and let it hash. For the Conversions API, you must hash on your server.

How can I tell if a value is hashed?

A SHA-256 hash is a 64-character string of letters a-f and numbers. If you can read the email, phone or name in the request, it is not hashed.

Is sending unhashed personal data to Meta a GDPR problem?

It can be, since personal data goes to a third party without the protection and consent you may need. Ask your privacy lead or lawyer for your case. Technically, fix it by removing personal data from URLs and hashing what you intentionally send.

How do I remove emails already stored in my analytics from URLs?

First fix the source so no new data arrives. Then add query parameter exclusions in your analytics tool and follow its data deletion process for existing records. The exact menus depend on the tool.

Can FunnelGuard tell me if personal data is leaking to Meta?

Yes. Its no_pii_in_tracking check runs your real form journey with a marked test lead and looks for personal data in plain text in tracking requests. It then sends an alert with a screenshot and a likely cause.

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.