- Google's policies forbid sending PII to Google Analytics: data that can directly identify, contact or precisely locate a person, such as email addresses, phone numbers and full names.
- On a webshop, PII usually leaks through page URLs, search terms, form submissions sent with GET, campaign tags and custom parameters.
- Find it by searching page locations and search terms for @ signs and number patterns, in reports or with a regex filter in Explore.
- Remove it with a data deletion request; it takes 7 to 63 days, data must be more than 12 days old, and some parameters, such as search_term, cannot be deleted this way.
- Prevent it with data redaction for email addresses and URL query parameters, POST forms and clean links; redaction does not cover the Measurement Protocol.
To find personal data in GA4, search your page URLs and search terms for email addresses, phone numbers and names, in the Pages and screens report or in an exploration with a regex filter. To remove it, file a data deletion request under Admin › Data collection and modification. To stop it from coming back, turn on data redaction for your web stream and fix the page, form or link that sends it. Google's policies forbid sending personally identifiable information (PII) to Google Analytics, so this is not optional.
This guide explains what Google counts as PII, where it gets into GA4 on a webshop, and the steps to find, delete and prevent it.
What is personally identifiable information (PII)?
Google interprets PII as information that could be used on its own to directly identify, contact or precisely locate a person. In Google's own list:
- Email addresses
- Mailing addresses
- Phone numbers
- Precise locations, such as GPS coordinates
- Full names or usernames
- Pseudonymous cookie IDs
- Pseudonymous advertising IDs
- IP addresses
- Other pseudonymous user identifiers
Two points matter for a European or Californian store. First, Google itself warns that data outside its PII definition, such as cookie ids and IP addresses, can still be personal data under the GDPR or personal information under US state laws. Second, government ids such as passport or social security numbers, dates of birth and login details are sensitive under any definition and never belong in analytics. Google adds that a fine-grained location means any area under one square mile, and that in some countries, such as the UK, a postal code can map to a single home.
Does GA4 contain PII?
Not by design. GA4 does not ask for names or email addresses, and its identifiers are pseudonymous. But GA4 records URLs, page titles, search terms, link URLs and every parameter a site sends, and any of those can carry personal data. Google is explicit that keeping it out is the site owner's responsibility.
How do you know if your site sends PII to GA4?
These are the usual leaks on a webshop:
| Where | How it leaks | Example |
|---|---|---|
| Page URLs | A form submitted with GET puts its fields in the URL; some apps add the email to a confirmation URL | /pages/thanks?email=ana@example.com |
| Search terms | Shoppers type an email, phone or order number into the store search | search_term = ana@example.com |
| Campaign tags | An email tool or an agency puts a merge tag with the email in utm_content or utm_term | utm_content=ana@example.com |
| Page titles | Account or order pages that put the customer's name in the title | Welcome back, Ana Jansen |
| Custom parameters | A data layer or app that sends name, email or address as an event parameter | customer_email on a sign_up event |
| User ID | Using the email address as user_id instead of a pseudonymous customer id | user_id = ana@example.com |
| Referrers | A link from a webmail or CRM page whose URL contains the address | page_referrer with an email in it |
How to look for PII in GA4
- Search the Pages and screens report
Select Reports, then Engagement › Pages and screens. Switch the dimension to Page path and screen class, set a long date range and type @ in the search box above the table. Repeat with %40, the URL-encoded @.
- Check search terms
In Explore, build a free-form table with Search term as the row and Event count as the value. Look for @ signs, long digit strings and names.
- Use a regex filter for the rest
In the same exploration, add Page location as a dimension and a filter with matches regex, using the patterns below. Check Page referrer, Page title, Link URL and the campaign dimensions the same way.
- Check custom definitions
Under Admin › Data display › Custom definitions, review every custom dimension. A name like email, phone, name or address is a warning sign.
- Follow each hit to its source
For each value found, find the page, form, app or link that produced it. Deleting the data without fixing the source only removes it until the next visitor.
Email address [A-Za-z0-9._%+-]+(@|%40)[A-Za-z0-9.-]+\.[A-Za-z]{2,}
Phone number (\+|00)?[0-9][0-9 ()-]{7,}[0-9]
Name parameters (first_?name|last_?name|full_?name|fname|lname)=
Address words (street|straat|road|avenue|po box)How to remove PII from GA4: data deletion requests
Data already collected can only be removed with a data deletion request. It erases the text of the parameters you choose and replaces it with "(data deleted)"; the events still count in totals.
- Open data deletion requests
In Admin, under Data collection and modification, click Data deletion request. You need the Editor role.
- Schedule a request
Click Schedule data deletion request and choose a type: all parameters on all events, all registered parameters on selected events, selected parameters on all events, selected registered parameters on selected events, or selected user properties.
- Set the dates and fields
Pick the start and end date, in the property's time zone, and up to 100 events, parameters or user properties.
- Narrow it to the bad values
Optionally choose "Only delete parameter values that contain the following text" and enter a value such as @. GA4 then deletes only values that contain it, case-insensitive.
- Check the preview, then wait
For the first 7 days you can preview the effect and cancel. After that the deletion runs, which takes 7 to 63 days. Once done, it cannot be reversed.
How to exclude PII going forward
Turn on data redaction
- Open the web stream
In Admin, under Data collection and modification, click Data streams and your web stream. You need the Editor role.
- Open Redact data
In the Events section, click Redact data.
- Redact email addresses
Turn on email redaction. GA4 then removes text that looks like an email address from all event parameters before it is sent. New properties have this on by default; older properties need it switched on.
- Redact query parameters
Turn on URL query parameter redaction and list the parameters to remove, such as email, phone, firstname and lastname. Press Enter after each one.
- Test it
In Test data redaction, enter a URL with those parameters and click Preview redacted data. The values should show as (redacted).
Redaction is best effort. It can miss unusual formats, can remove text that only looks like an email address, does not look at HTTP headers such as the referrer, and only works for web streams. It does not apply to data sent through the Measurement Protocol or Data Import, so server-side events must be clean at the source.
Fix the source
- Forms: submit with POST, not GET, so fields never reach the URL.
- Links: use a customer id or token instead of an email address in URLs, and check email templates for merge tags in UTM parameters.
- User ID: send your platform's customer id, never an email address.
- Page titles: keep names out of titles on account and order pages.
- Search: filter terms that look like emails or phone numbers before they reach GA4, or accept that site search will need regular checks.
- Apps: check what each tracking app sends; a data layer can add fields you never asked for.
Consent decides which visitors you may track at all, which is a separate question from what you send; see consent mode and consent in ROASaurus. Search terms are covered in site search tracking in GA4, campaign tags in organic search traffic in GA4, and the events you decide to measure in GA4 key events. If you send revenue, make sure only amounts and product data travel with it; see item revenue vs purchase revenue. For which reports to audit regularly, see the guide to GA4 ecommerce reports; Search Console has its own data, covered in Search Console for Shopify. A PII check also belongs in the BFCM tracking checklist before you launch campaigns with new landing pages.
Personal data in ROASaurus's GA4 events
When ROASaurus sends purchases and refunds to GA4 through the Measurement Protocol, GA4's data redaction does not apply, so the events are built to carry no PII by default:
| Field | Default | When it changes |
|---|---|---|
| user_id | Not sent | Only when you tick "Send the shop customer id as user_id", which sends the store's customer id, never an email |
| Email, phone, address | Not sent | Only when you tick user-provided data, after turning on user-provided data collection in GA4: email, phone and names SHA-256 hashed, city, region, postal code and country in plain text |
| IP address and user agent | Sent for consented visitors | Not sent when the visitor did not consent |
| client_id | The browser's GA4 id when consented | Without consent, an id derived from the order alone |
| Page URL | The page of the event, when known | Not sent with refunds |
Which visitors count as consented is set under Settings › Store: the consent mode, and the consent tool ROASaurus reads, such as Shopify's customer privacy settings, OneTrust, Cookiebot, Usercentrics or Google Consent Mode. Data quality › Consent shows the consent rate and what share of visitors were recognised. Inside ROASaurus, the SQL views carry email addresses only as SHA-256 hashes, the ready-made reports carry none, and storefront events in the SQL views have contact fields removed. Data is hosted in Amsterdam, with a data processing agreement.
Sources
- Google Analytics Help: Best practices to avoid sending Personally Identifiable Information (PII)
- Google Analytics Help: Understanding PII in Google's contracts and policies
- Google Analytics Help: Data redaction
- Google Analytics Help: Data-deletion requests