What counts as personal data in analytics
The GDPRThe EU regulation setting the rules for processing personal data, including its principles, lawful bases, individuals' rights and breach duties. defines personal data broadly: any information relating to an identified or identifiable person, including names, identification numbers, location data and online identifiers. It also sets out principles that apply to every system holding such data, and two of them matter most here. Data minimisation means collecting only what is adequate, relevant and limited to what the purpose needs. Storage limitation means keeping data in a form that identifies people for no longer than the purpose needs. An analytics property that quietly accumulates email addresses fails both, because no report ever needed them.
Analytics data falls into two groups, and the distinction drives everything below.
| Group | Examples | How to treat it |
|---|---|---|
| Data that names or directly reaches a person | Email address, name, phone number, postal address, a login name, free text a person typed | Keep it out of analytics entirely; Google's terms forbid sending it, as the events and parameters guide states |
| Pseudonymous identifiers | The cookie-based client identifier, an internal customer number used as a User-ID, a session identifier | The basis of measurement; still personal data under the GDPR, so collected under the consent and lawful basis the plan records |
| Details that reveal something sensitive | Page paths or parameters that reveal a health condition, a financial difficulty or similar | The GDPR gives some categories, health among them, special protection; combined with any identifier, such details deserve a deliberate decision rather than a default |
The guide's subject is the first group, and making sure the second group never turns into it. A first-partyData a business collects directly from its own customers, visitors and users. customer record is valuable in the CRM, where access, purpose and retention are managed; the same email address in an analytics dimension is visible to everyone with report access, copied into every export and kept for as long as the property and the export hold it. How long each marketing tool, including the warehouse that receives the export, keeps the personal data it does need is covered in the guide to data retention across marketing tools.
How personal data gets in
Almost every leak is one of a short list of routes. Each has a recognisable signature in the data.
| Route | How it happens | Where it shows |
|---|---|---|
| Forms that submit in the address bar | A form sends its fields as query parameters, so the next page's address carries them | Page location and page path with query strings |
| Identifiers in confirmation and account addresses | Booking confirmations, unsubscribe links, password resets and account pages built with an email or name in the address | Page location; referrer of the next page |
| Site search | People type email addresses, names, phone numbers and order references into the search box | The search term parameter |
| Triggers that read the page | A variable reads a form field's value, a greeting such as "Welcome back, Jane", or text from an order summary | Custom event parametersA named value sent with an analytics event that describes it, such as a page location, form name or item price. |
| Page titles | Account and order pages whose titles include the customer's name | Page title |
| CRM fields sent as attributes | A user property or Custom DimensionA GA4 reporting field created by registering an event, user or item parameter so it appears in reports and explorations. filled from the customer record | User properties and custom dimensions |
| Campaign tags filled by other tools | An email platform's merge field puts the subscriber's address into a campaign parameter | Campaign dimensions such as content and term |
| An over-full data layer | The purchase object carries the customer's email for a tag that needs it, and other tags read it too | Any tag configured to forward the whole object |
Two of these deserve a closer look. The data layer route is subtle because the data layer is supposed to hold rich information; Google's documentation describes it as the object that passes information to tags, and the data layer guide explains the merging behaviour that lets a value pushed for one purpose linger for the next tag that reads the same key. Where a tag genuinely needs customer data, as the enhanced conversions guide describes for one advertising feature, the push and the variables that read it have to be scoped so that the analytics tag never sees them. The campaign tag route is subtle because nobody on the analytics side wrote it: the person building an email template added a merge fieldA placeholder in an email or message template replaced with a value from each contact's record, such as a first name, with a fallback when it is empty. to make links "personal", and every click now carries an address into campaign reports. Research tools beside analytics raise the same question: session recordingsA reconstruction of one visitor's visit, replaying their clicks, scrolling, taps and form interactions, used to see how a page is actually used. can capture what people type into forms, which is why the tutorial on reviewing session recordings and heatmaps masks every input before a single recording is collected.
Where it spreads once collected
Fixing a route stops new data. It does nothing about the copies already made, and in a modern measurement stack there are several.
- The property itself. Standard reports, explorations, saved comparisons and any audience whose conditions read the affected dimension.
- The BigQuery export. Every parameter arrives in the raw event tables whether or not it was registered, and, as the BigQuery export basics guide notes, those tables stay for as long as you keep them.
- Summary tables and dashboards. Scheduled queries that aggregated page locations or search terms, dashboards connected to the property or the export, extracts and cached results, scheduled PDF deliveries.
- Downloads. Spreadsheets exported for a meeting months ago, attachments in email threads, slides with a screenshot of a search terms table.
Write this list down for your own stack before the first incident, with an owner for each place. When a leak is found, the list becomes the clean-up plan.
Finding it: a sweep of reports and the export
A sweep is a search for the signatures of personal data across every place a free-text value can land. Run it once now, after every release that touches forms, search or account pages, and on a schedule alongside the data quality routine.
- List the free-text fields. Page location, page path and query string, page title, page referrer, the search term, every registered custom dimension and user property, and the campaign dimensions.
- Define the patterns. An at sign followed by a domain for email addresses; long runs of digits for phone and card numbers; query keys such as email, name, phone, address and postcode; greeting words in titles; the formats of your own account and order references.
- Search the interface. In an exploration, add each free-text dimension with a filter that matches the patterns, over the longest period event data allows; the retention step of the GA4 setup tutorial decides how far back that is.
- Search the export. Query the string values of every parameter and user property for the same patterns; the export holds parameters that were never registered and so never appear in the interface.
- Record counts and locations, not values. Note which field, which page template or campaign, from when and how many events. Never paste the found data into a ticket, a chat or a spreadsheet, which only creates another copy.
The audit in the analytics implementation scorecard checks tags, consent and events; adding the sweep to it turns a one-off search into part of the regular review.
Stopping it at the source
The rule is to fix the page or the data layer first and to use the container only as a safety net. A container can redact what it receives, but it only sees what the page gives it, and a redaction pattern written for today's formats will miss tomorrow's.
| Route | Fix at the source | Safety net in the container |
|---|---|---|
| Forms in the address bar | Submit forms in the request body, not the address; never place field values in a redirect | Strip listed query keys from the page location before it is sent |
| Confirmation and account addresses | Use an opaque reference in the address and look the customer up on the server | The same cleaned page location |
| Site search | Keep the feature; agree a redaction rule for patterns before the term is sent | A variable that replaces matching patterns with a placeholder |
| Triggers that read the page | Push only the form name, type and outcome to the data layer; never the values | Remove any variable that reads input fields or greeting text |
| Page titles | Give account and order templates titles without names | Send a template name as the title for those templates |
| CRM fields as attributes | Send categories, such as customer tier, not identifiers | Review every user property against the tracking plan |
| Campaign tags from other tools | Ban personal merge fields in campaign parameters in the naming convention | Treat campaign values that match the patterns as a release blocker |
| Over-full data layer | Scope customer data to the push and tag that need it | Keep customer fields out of any object a tag forwards wholesale, such as the e-commerce object |
The cleaned page location is worth a sentence of detail because it covers several routes at once. The container builds the address without the listed query keys in a variable, and the analytics tag sends that variable as the page location; the GA4 through GTM tutorial shows the same field being set explicitly for single-page applications. Keep the list of stripped keys in the tracking plan, next to a rule that no parameter may carry personal data, so that developers see the constraint where they read the specification.
Pseudonymous identifiers and hashing
Analytics needs identifiers to count users and stitch sessions, and they are legitimate when collected under the consent and lawful basis the measurement plan records. They are also personal data: the GDPR treats pseudonymised data, which can be linked to a person with additional information, as personal data still. Two practical rules follow.
First, a User-ID should be an internal identifier that only your systems can resolve: a customer number, not an email address, a phone number or a name. Second, do not build that identifier by encoding or hashing an email address. A hash of an address comes out the same for anyone who applies the same method to it, so any party holding the address can match it; it has changed the format of the identifier, not its nature. Where Google documents sending hashed customer data, as with enhanced conversions, it is for a specific advertising feature, and the analytics pages cited here describe no such use for parameters, so a hashed email in an analytics dimension should be found and removed like any other. The routine for minimising data before prompting applies the same reasoning to customer data sent to AI tools, including where to keep the key when you pseudonymise.
When personal data has already been collected
A sweep that finds something starts a short, ordered response.
- Stop the source. Ship the fix, then confirm with the sweep that new events are clean.
- Record the incident. Field, route, first and last date, number of events, the release that caused it and the one that fixed it.
- Tell the person who owns privacy. Whether anything must be reported, and to whom, is their decision with legal advice; this guide does not make it.
- Clean the places you control. Rewrite or delete the affected rows in the export and in every summary table built from it, refresh dashboards, extracts and caches, and ask people who downloaded affected reports to delete their copies.
- Check the platform's own options for the property. Read the Analytics help centre for the current ways to remove collected data before choosing one, because what can be removed, and at what granularity, is the platform's to define rather than this guide's.
- Sweep again after a week to confirm nothing new has arrived by a route you missed.
Quernlight Physiotherapy sweeps its property
Quernlight Physiotherapy is an invented group of six clinics with an online booking form. A new analyst runs the sweep over the 61 days of data the team can check and finds three routes. The booking form submits in the address bar, so 1,284 page view events carry an email address and phone number in the confirmation page's location. The site search box holds 212 terms that match the patterns, mostly patients typing their own email address or a physiotherapist's full name. And the account page title, "Bookings for" followed by the patient's name, appears on 38 events. The export query that finds the first and second routes looks like this:
SELECT event_date, event_name, p.key, COUNT(*) AS events
FROM `quernlight-analytics.analytics_481516.events_*`, UNNEST(event_params) AS p
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261130'
AND REGEXP_CONTAINS(p.value.string_value, r'[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}')
GROUP BY event_date, event_name, p.key
ORDER BY events DESC;
The fixes ship in one release: the form posts its fields and the confirmation page shows a booking reference, the container strips the email and phone keys from the page location and replaces pattern matches in search terms with a placeholder, and the account template's title becomes "My bookings". The analyst records the incident with counts and dates, the practice manager who owns privacy reviews it, and the affected partitions in the export and two summary tables are rewritten without the values. A sweep a week later finds three search terms that slipped through because patients typed spaces inside their phone numbers; the redaction pattern is widened, and the following sweep returns nothing.
A sweep finds the most when it runs on a rhythm rather than after an incident; the privacy and consent operations playbook schedules it beside the monthly suppression check and the quarterly retention runs, with named owners for each.
Common mistakes
- Fixing the tag and forgetting the copies. The export, summary tables, dashboards and downloads still hold what the property received before the fix.
- Relying on container redaction alone. The page keeps producing the data; the container misses the first format nobody anticipated.
- Turning off site search tracking instead of redacting it. The search log is one of the most useful reports a site has, and the problem was a handful of patterns.
- Personal merge fields in campaign links. The email team's personalisation becomes the analytics team's leak; the naming convention has to forbid it.
- Calling a hashed email anonymous. It still identifies the person to anyone holding the address.
- Pasting examples into tickets. Recording the values to prove the problem makes another copy of it.
- Treating consent as permission. A visitor who accepted analytics cookies did not agree to have their email address stored in a report, and the tool's terms forbid it either way.
- Sweeping once. Every release that touches forms, search, accounts or email templates can open a new route; the sweep belongs in the routine.
The measurement planning hub places this check beside the other parts of the plan, and the privacy and consent guide covers what tags may observe once a visitor has made a choice.
