On this page
What this issue is
PII means personally identifiable information: an email address, full name, phone number, postal address or similar data that points to a real person. Tracking pixels (small scripts from Meta, Google, TikTok, LinkedIn and others) send data to their platform each time a page loads or a form is submitted.
The problem appears when that data goes out before consent, or when it was never meant to go out at all. Common causes: an email in a thank-you page URL (?email=jane@example.com), a pixel's automatic form matching reading typed fields, a tag that fires on page load while the cookie banner is still open, or a custom event that pushes the email into its parameters.
Why it costs you leads or sales
The direct risk is regulatory and reputational: sending personal data to an ad platform without a lawful basis can lead to complaints, fines and forced takedowns. The indirect cost is to your marketing. Platforms can reject or restrict data that arrives in breach of their policies, and you may have to delete audiences built from it.
There is also a trust cost. Visitors who click Reject on your banner and still get tracked may abandon forms. Teams who respond by switching tracking off completely lose attribution, so ad spend gets optimised on bad data. The goal is tracking that respects the choice and still works for those who agree.
- Visitor landsCookie banner appears
- Pixel loads anywayTag has no consent condition
- Form submittedEmail in URL or event data
- Ad platform receives PIISent without consent
- Compliance riskComplaint, deletion, audit
The visitor never agrees, yet the pixel has already sent the data.
How to check if your site has it
Open a clean browser session
Use a private window with no saved consent. Open DevTools (F12) and go to the Network tab. Tick Preserve log.
Load the page and do not touch the banner
Filter by domains such as facebook.com/tr, google-analytics.com/g/collect, googleadservices.com, analytics.tiktok.com, px.ads.linkedin.com. Any request before you choose is a consent problem.
Click Reject, then submit a test lead
Use a fake address like test+consent@example.com and a made-up name and phone. Watch which requests still go out.
Search requests for your test data
Use the Network search (Ctrl/Cmd+F) for your test email, name and phone. Also try the URL-encoded form (test%2Bconsent%40example.com) and look for hashed values in parameters such as
em,ph,ud[em]orec.Check page URLs
Look at the address bar on thank-you and booking pages. Query strings with email, name or phone are copied into the page_location of analytics hits.
How to fix it
Work in this order: stop the leak before consent, then remove PII at the source, then re-test. The platform steps below cover the first part.
Turn on consent overview
Admin > Container Settings > tick Enable consent overview. Then open Tags > Consent overview (shield icon).
Require consent per tag
For each pixel, open Advanced Settings > Consent Settings and require ad_storage, analytics_storage or ad_user_data as appropriate. For tags without built-in consent checks, add the required consent type.
Set defaults to denied
Make your consent banner tool set default consent state to denied, and update it to granted only after the visitor accepts. Fire the default command before the GTM snippet.
Strip PII from data
Check variables and data layer pushes for emails, names and phones. Use a custom JavaScript variable or a URL variable that removes query strings from page_location, and stop sending form fields as event parameters.
Preview and publish
Use Preview, reject consent, submit a test lead and confirm the pixels show as not fired. Then publish.
Find where the pixel is added
Check your consent plugin, a header/footer plugin, your theme settings and any marketing plugin (for example a Meta or TikTok plugin). Pixels hard-coded in several places will fire regardless of the banner.
Route them through your consent tool
Use your consent plugin's script blocking or categories so marketing scripts only load after acceptance. Settings differ by plugin, so check its documentation.
Turn off automatic advanced matching if you do not need it
In the pixel plugin's settings, disable options that send email or phone from forms. Remove email from thank-you redirects in your form plugin (use a plain /thank-you URL).
Use Customer Privacy settings
Settings > Customer privacy. Set the region rules so tracking requires consent where needed, and use a banner that connects to Shopify's Customer Privacy API.
Use app pixels, not theme code
Add pixels through Settings > Customer events (customer pixels) or the official channel app, which respect consent. Remove pixel snippets pasted into theme.liquid.
Check what customer data is sent
In each channel app (Meta, TikTok, Google), review the customer information or data sharing level and lower it if you do not need it.
Move scripts out of site settings
Project Settings > Custom code: pixels pasted in the head load for everyone. Load them via a consent tool or GTM instead.
Fix form redirects
Form settings > Redirect URL: use a plain thank-you page with no query string containing the visitor's answers.
Use the cookie banner
Settings > Cookie Banner. Make sure marketing pixels are added through Marketing Integrations or Tracking & Analytics so they are assigned a category (marketing or analytics) that the banner controls.
Check custom code
Settings > Custom Code: set each pixel snippet to load only for the right category if the option is offered, or move it into the Tracking & Analytics tools.
Use Cookie Banner settings
Settings > Cookies & Visitor Data. Set the banner to block cookies until consent where required.
Review code injection
Settings > Advanced > Code Injection: scripts pasted here load for everyone. Replace them with a consent-aware method.
Review tracking code locations
Check funnel and website settings for header tracking code, and the Facebook pixel field in funnel settings.
Load scripts conditionally
Use a consent tool that can gate custom scripts, or load pixels via GTM with consent conditions. Avoid passing contact details in thank-you page URLs.
Load pixels only after consent
Inject the pixel script from your consent callback, not from static HTML. See the snippet below.
Never put PII in URLs
Redirect to /thank-you without query data and keep details server-side or in session storage.
// Replace onConsentGranted with your consent tool's real callback.
function loadMarketingPixel() {
if (window.__pixelLoaded) return;
window.__pixelLoaded = true;
var s = document.createElement('script');
s.src = 'https://example-pixel-vendor.com/pixel.js';
s.async = true;
document.head.appendChild(s);
}
onConsentGranted('marketing', loadMarketingPixel);window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied'
});
// After the visitor accepts:
// gtag('consent', 'update', { ad_storage: 'granted', ad_user_data: 'granted', ad_personalization: 'granted', analytics_storage: 'granted' });Before
- Pixel fires on page load
- Thank-you URL contains ?email=...
- Form fields read by automatic matching
- Requests visible after clicking Reject
After
- Pixels wait for consent
- Thank-you URL is a plain path
- Automatic matching off or consent-gated
- No marketing requests after Reject
Consent: blocked / denied
- GA4no hit
- Google Adsno hit
- Meta Pixelno hit
With consent denied, the pixel still fires and sends the visitor's email to the ad platform.
Toggle the cause to see what happens when a visitor clicks Reject.
How to confirm it's fixed
- In a private window, no marketing requests appear before you choose on the banner
- After Reject, submitting a test lead sends no requests to ad platforms
- After Accept, the expected conversion events do fire
- Searching the Network tab for your test email, name and phone (plain, encoded and hashed) finds nothing in denied state
- Thank-you and booking URLs contain no personal data
- GTM Preview shows consent-required tags as not fired when denied
- The lead still reaches your inbox and CRM
How to prevent it happening again
- Keep one place where pixels are added, ideally the tag manager, with consent settings on every tag
- Review tags whenever a new plugin, app or agency adds tracking
- Never pass personal data in query strings or custom event parameters
- Re-test with consent denied after every theme, plugin, banner or container change
- Restrict who can publish in your tag manager
- Record which data each pixel is allowed to receive
Day 1
Agency adds a new ad pixel directly in the theme header
Day 2
Form redirect starts including ?email= for a CRM hand-off
Week 3
Visitors who rejected cookies are still sending data
Week 6
Network audit finds the leak and the pixel is moved behind consent
How FunnelGuard handles this
FunnelGuard covers this issue partly. Its no_pii_in_tracking check (consent variant) looks at the tracking hits your journeys send to ad and analytics platforms and flags personal data, such as an email, appearing in them when the journey runs in the consent-related variant. It runs on a schedule, so a leak introduced by a new plugin or tag change can raise an alert with a screenshot and a likely cause, after a re-check from a second region.
What it does not do: it does not judge whether your consent banner wording or your lawful basis is adequate, it does not audit every pixel parameter on every page outside the journeys you set up, and it does not replace advice from a privacy professional. Test traffic is marked and never bypasses CAPTCHAs or bot protection.
Cover the rest by hand: run the Network tab check above with consent denied after each release, review tag manager changes, and keep PII out of URLs. The Free plan (1 site, 2 journeys, daily checks, no card) is enough to try it, and paid plans include a 3-day free trial. A free read-only website audit is also available.
Questions people ask
Why is my tracking pixel sending email addresses?
Common causes are an email in the thank-you page URL, the pixel's automatic form matching reading typed fields, or a custom event that includes the email as a parameter. Open DevTools > Network, submit a test lead and search the requests for your test email to find the source.
Can a Meta pixel collect personal data before consent?
Yes, if it is loaded without a consent condition. It fires on page load and can send identifiers and, with advanced matching on, hashed email or phone. Load it only after the visitor accepts marketing cookies and turn off matching you do not need.
Does Google Consent Mode stop PII from being sent?
No. Consent Mode controls storage and how Google tags behave when consent is denied. It does not strip an email you put in a URL or event parameter, so remove PII at the source too.
How do I check if a pixel fires before the cookie banner is accepted?
Open a private window, open DevTools > Network with Preserve log on, and load the page without touching the banner. Any request to facebook.com/tr, google-analytics.com or similar before you choose means a tag is ignoring consent.
Is a hashed email still personal data?
Generally yes. A hash of an email can still be matched to a person, so treat it as PII and send it only with consent. Ask your privacy adviser how your local rules apply.
How do I stop email addresses appearing in thank-you page URLs?
Redirect to a plain path such as /thank-you with no query string. If you need the data on the next page, keep it server-side or in session storage instead of the URL, since analytics tools copy the URL into their hits.
Can FunnelGuard detect PII leaking to ad platforms?
Partly. Its no_pii_in_tracking check, consent variant, flags personal data such as an email in the tracking hits sent by your monitored journeys. It does not judge your banner wording or audit every pixel on every page, so keep doing a manual consent-denied check.
Related issues
- OPS-204Session recording capturing card or password fieldsFix guide
- OPS-199Tag manager container edited by unknown userFix guide
- OPS-196Unknown third-party domain appears on checkout pageFix guide
- OPS-200Too many third-party scripts (performance and risk)Fix guide
- OPS-206Ad network script injecting redirectsFix guide
- OPS-195Magecart / card skimmer script on checkoutFix guide