Privacy

How to find and remove personal data (PII) in GA4

What counts as PII in Google Analytics, where it leaks into GA4 on a webshop, how to find it, how to delete it and how to stop it with data redaction.

·8 min read·By the ROASaurus team

Key takeaways
  • 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:

PII in Google's sense
  • Email addresses
  • Mailing addresses
  • Phone numbers
  • Precise locations, such as GPS coordinates
  • Full names or usernames
Not PII in Google's sense
  • Pseudonymous cookie IDs
  • Pseudonymous advertising IDs
  • IP addresses
  • Other pseudonymous user identifiers
From Google's page on PII in its contracts and policies.

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:

WhereHow it leaksExample
Page URLsA 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 termsShoppers type an email, phone or order number into the store searchsearch_term = ana@example.com
Campaign tagsAn email tool or an agency puts a merge tag with the email in utm_content or utm_termutm_content=ana@example.com
Page titlesAccount or order pages that put the customer's name in the titleWelcome back, Ana Jansen
Custom parametersA data layer or app that sends name, email or address as an event parametercustomer_email on a sign_up event
User IDUsing the email address as user_id instead of a pseudonymous customer iduser_id = ana@example.com
ReferrersA link from a webmail or CRM page whose URL contains the addresspage_referrer with an email in it
Example values. Google names URLs, titles, user input, user IDs, custom dimensions, campaign parameters and site search terms as the fields to watch.

How to look for PII in GA4

  1. 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 @.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Regex patterns to start from. Adjust them to your languages and number formats; expect some false hits.
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.

  1. Open data deletion requests

    In Admin, under Data collection and modification, click Data deletion request. You need the Editor role.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  1. Open the web stream

    In Admin, under Data collection and modification, click Data streams and your web stream. You need the Editor role.

  2. Open Redact data

    In the Events section, click Redact data.

  3. 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.

  4. 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.

  5. 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:

FieldDefaultWhen it changes
user_idNot sentOnly when you tick "Send the shop customer id as user_id", which sends the store's customer id, never an email
Email, phone, addressNot sentOnly 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 agentSent for consented visitorsNot sent when the visitor did not consent
client_idThe browser's GA4 id when consentedWithout consent, an id derived from the order alone
Page URLThe page of the event, when knownNot sent with refunds
The GA4 destination under Connections › Tracking & destinations. Consent mode signals ad_user_data and ad_personalization follow the visitor's choice.

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

  1. Google Analytics Help: Best practices to avoid sending Personally Identifiable Information (PII)
  2. Google Analytics Help: Understanding PII in Google's contracts and policies
  3. Google Analytics Help: Data redaction
  4. Google Analytics Help: Data-deletion requests

In ROASaurus

Keep reading

MarketingBFCM tracking checklist: can you trust your ad results?A Black Friday tracking checklist: test a real purchase, find duplicate conversions, choose which orders count, check consent and judge ads on profit.AnalyticsGoals, key events and micro conversions in GA4How GA4 replaced goals and conversions with key events, how to mark micro conversions for a webshop, and how to read them without inflating your numbers.AnalyticsGoogle Search Console for Shopify, with GA4 and Google AdsSet up Google Search Console for a Shopify store, verify the domain, submit the sitemap, and link Search Console, GA4 and Merchant Center to Google Ads.

FAQ

Questions, answered

More answers in the FAQ and the help center.

What does Google consider PII in Google Analytics?

Information that could be used on its own to directly identify, contact or precisely locate a person: email addresses, mailing addresses, phone numbers, precise locations such as GPS coordinates, and full names or usernames.

Are IP addresses and cookie IDs PII in GA4?

Not under Google's PII definition. Google warns that they can still be personal data under the GDPR and other privacy laws.

How do I exclude PII in Google Analytics 4?

Turn on data redaction in your web stream for email addresses and the URL query parameters that carry personal data, submit forms with POST, keep emails out of links and user IDs, and check what apps send.

How do I delete PII that is already in GA4?

Create a data deletion request under Admin › Data collection and modification › Data deletion request. Data must be more than 12 days old, and processing takes 7 to 63 days after a 7-day grace period.

Does data redaction cover server-side events?

No. Google says data redaction does not prevent PII collected through the Measurement Protocol or Data Import. Server-side events have to be clean when they are built.

Can I delete an email address in a GA4 search term?

Not with a data deletion request: search_term is one of the automatically collected parameters GA4 does not delete. Stop it from being collected and keep the report access limited.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. Free plan, no credit card.