Skip to main content
TagManifest /Docs Dashboard

Parameters with PII-suggesting names

Parameters with names like "email", "phone", or "user_name" — GA4 prohibits sending PII.

On this page 6

Summary

  • rule_id — ga4-pii-parameter-names
  • purpose — Detect GA4 event parameters and user properties with names that suggest personally identifiable information
  • effect — PII field names sent to GA4 violate Google's Terms of Service and expose users to regulatory risk
  • layer — container
  • reversibility — non-destructive

What fires this

The rule inspects all active GA4 tags via getGA4Tags(). For each tag it collects ga4.eventParameters and ga4.userProperties, then tests each parameter name against a fixed pattern list: email, e_mail, mail, phone, telephone, mobile, first_name, last_name, full_name, user_name, username, ssn, social_security, credit_card, card_number, address, zip_code, postal_code, date_of_birth, dob, ip_address, passport. Matching is case-insensitive. A parameter is excluded only when its value is a GTM variable reference (starts with {{). Any remaining match produces an issue. Paused tags are excluded.

Why it matters

GA4's Terms of Service prohibit sending personally identifiable information to Google's servers. A parameter named email carrying a raw email address — or phone carrying a phone number — is a direct ToS breach. Google may suspend data collection or terminate the property. Beyond ToS, transmitting identifiable values to a third-party analytics platform without a lawful basis violates GDPR. Hashing the value before dispatch is not sufficient if the parameter name alone reveals intent; rename or remove the parameter entirely. Regulatory: GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis).

Before / after

// GA4 event tag — custom parameters
gtag('event', 'sign_up', {
  email: user.email,          // raw PII — flagged
  phone: user.phoneNumber,    // raw PII — flagged
  plan: 'pro'
})
async function sha256hex(str) {
  const buf = await crypto.subtle.digest(
    'SHA-256',
    new TextEncoder().encode(str)
  )
  return Array.from(new Uint8Array(buf))
    .map(b => b.toString(16).padStart(2, '0')).join('')
}

gtag('event', 'sign_up', {
  user_id_hash: await sha256hex(user.email),  // hashed, renamed
  plan: 'pro'
})

Remediation

  1. Open GTM and locate each flagged GA4 tag.
  2. Identify which parameters match the PII name list (see "What fires this" above).
  3. Determine whether the collected value is confirmed PII or a false positive.
  4. For confirmed PII: rename the parameter to a non-identifying key and hash the value with SHA-256 before dispatch.
  5. If the data is not needed for the measurement use case, remove the parameter entirely.
  6. For false positives: add a GTM tag comment documenting why the name is safe.
  7. Publish the updated container and verify GA4 DebugView shows no PII field names.
  8. Submit a data deletion request in GA4 Admin to purge any PII already collected.

Metadata

Severity
critical
Tier
error
Category
ga4
Layer
container
Version
1
Effort
15min (about 15 minutes)
Reversibility
non-destructive
Regulatory
GDPR Art. 5 (data minimization), GDPR Art. 6 (lawful basis)

See also

Examples

Evaluate
curl https://developer.tagmanifest.com/v1/evaluate-rule \
  -H "Authorization: Bearer $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"ga4-pii-parameter-names","url":"https://example.com"}'