Event quality & PII warnings

GA4 events are only as valuable as their schema consistency and PII hygiene. This help page explains which anomalies the Auditor reports in the event quality section and how to interpret them.

What does the app check?

The event quality checks scan raw events from the BigQuery export for:

  • PII patterns in user_properties, page_location and event parameters
  • (not set) shares in required fields (items, values, page title)
  • Missing items in purchase events
  • debug_mode=1 events in production
  • Duplicates within the same second / the same 5-minute window

When is a check triggered?

Check Threshold
PII (email/phone in parameters) >0% = critical
(not set) share >1% = warning, >5% = red
purchase without items any occurrence = red
debug_mode=1 in production >0% = info/warning
Event duplicates in the 5-min window >2% = red

The checks live in event_quality.sql, duplicate_events.sql, event_values.sql as well as in app/services/ga4_api_check_service.py for the (not set) thresholds.

Common causes

  • PII in parameters → email address accidentally passed as utm_content or in the page path, phone number as item_id, customer ID as user_id without prior pseudonymization. Mandatory: GA4 closes accounts that store PII.
  • (not set) from missing mappings → event parameter isn't set in GTM, a dynamic variable returns undefined, the server response isn't parsed correctly.
  • Duplicates → HTTP retry without an idempotency check, GTM trigger fires twice, plugin conflict (WooCommerce + GA4 plugin running in parallel).
  • debug_mode=1 in production → the tracker wasn't reset after a local test; this skews conversion reports.

How to proceed

  1. Open the event errors section (create_event_errors_section) in the dashboard - it clusters the findings by category (PII, items missing, duplicates, (not set)).
  2. Fix PII warnings immediately - no audit is worth doing while plaintext emails are landing in events. GA4 threatens to suspend your account.
  3. Classify the (not set) pattern into its typical causes using the blog post “(not set)” in GA4 - where auditing really begins.
  4. Break down duplicates with Duplicate purchases in GA4 - that's where the SQL logic of the second-bucket detection is explained.
  5. Check debug_mode in the GA4 configuration of the GTM tag.