Skip to main content

GA4 Parameter Detection

💎Premium Feature

This feature is exclusive for Premium users!

The GA4 Parameter Detection module automatically discovers and tracks user properties, custom event parameters, and item parameters in your GA4 raw export. This powerful auditing tool helps you identify configuration gaps, data quality issues, and optimization opportunities in your GA4 implementation.

Key Features​

  • Automatic Discovery: Identifies parameters in your data that aren't configured
  • Configuration Validation: Flags configured data types that lose values, and type differences that do not
  • Issue Model: One row per issue with severity, evidence, active/resolved status and a suggested fix
  • Junk Value Detection: Flags placeholder values such as undefined, null or unresolved {{GTM variables}}
  • Expected Values: Checks values against your own rules (regex, allowed list, numeric range) and flags well-formed but wrong values
  • Coverage and Missing Days: Shows how many events carry a parameter, and on which days it went missing
  • Sample Value Analysis: Shows actual values being collected for each parameter
  • Trend Monitoring: Tracks parameter usage over time with daily granularity
  • Config Generation: Suggests configuration code for discovered parameters and type fixes for lossy ones
  • PII Detection: Scans parameter names, values and URL query strings for personally identifiable information
  • Suppressions and Assertions: Accept known findings, and get opt-in alerts when a new issue appears
  • Multi-Property Support: Tracks parameters per GA4 property with property_id and property_name columns
New in Premium v2.2.18

Expected values: rules for what a parameter's values should look like, with a new unexpected_values issue and an opt-in assertion. The missing_days assertion no longer raises false alerts right after an update. Existing installs: read Upgrading from earlier versions.

New in Premium v2.2.17

The module was overhauled: new issues and daily_health tables, an issue model with suppressions and opt-in assertions, junk value and missing-day detection, improved PII detection, and a slim custom config. Existing installs: read Upgrading from earlier versions.

Configuration​

The module uses a YAML configuration file: includes/custom/modules/ga4_parameter_detection/config.yaml

Your custom file only holds the keys you want to change. Every other option takes its default from includes/core/modules/ga4_parameter_detection/config.yaml - the full reference with every key and comment. Do not edit the core file: the installer overwrites it on update. Copy a key into your custom file to override it.

How your custom file is merged with the core defaults:

  • Single values (for example enabled or rate_threshold): your value wins.
  • Lists (for example exclude_params, known_pii_param_names, suppressions): your entries are appended to the core list.
  • Named entries in pii_value_patterns: your entry replaces the core entry with the same name. Copy the whole entry from the core file and change what you need - an entry without name, regex and enabled stops compilation with an error.

See How Configuration Works for the general rules.

New installs get this slim file:

config.yaml (custom file for new installs)
# GA4 Parameter Detection - custom configuration
# Only the keys below are commonly changed. Every other option has a default in
# includes/core/modules/ga4_parameter_detection/config.yaml (full reference); add a key here to override it.
# Custom scalars win, lists are appended to the core list, named objects replace the core entry.
version: 3
enabled: false
dependencies: []

# Parameter filtering
exclude_params: []
exclude_category: [] # standard, custom, discovered
exclude_events: []
include_events: []

# Date range control
# When you run a full refresh, the earlier of start_date and today - max_lookback_days is used. Keep start_date at
# '9999-01-01' to rebuild only the last max_lookback_days days (cheap); set a real date to rebuild from that date.
max_lookback_days: 7
start_date: '9999-01-01'

pii_detection:
# PII detection is on by default (email values + PII-looking parameter names). To turn it off:
# enabled: false
# Mask detected PII in sample_values (report_daily, aggregated, issues)
mask_pii_in_samples: false
# Add your own names or patterns (appended to the core lists):
# known_pii_param_names:
# - customer_number
# suspected_pii_param_patterns:
# - '(^|_)loyalty_?id$'
# Add a value pattern, or override a core one by name. A custom entry REPLACES the core entry with
# the same name, so copy the whole entry from the core config and change what you need:
# pii_value_patterns:
# - name: phone_intl
# enabled: true
# regex: '\+[1-9]\d{0,2}[\s.-]?\(?\d{1,4}\)?[\s.-]?\d{1,4}[\s.-]?\d{1,9}'
# description: 'International phone number with country code detected'
# additional_sql: "length(regexp_replace({value}, r'[^0-9]', '')) between 10 and 15"
# exclude_params: []

# Accepted findings - see the core config for the full key reference.
suppressions: []

# Junk placeholder values - defaults: undefined, null, NaN, [object Object], (not set), '' and {{...}} / %%...%%
# junk_detection:
# rate_threshold: 0.05
# min_occurrences: 50

# Expected value shapes - a value must pass every check of the rules that cover it (see the core config).
# A row gets the unexpected_values issue when at least rate_threshold of its occurrences that day break a rule, with
# at least min_occurrences occurrences; a rule can override both.
# expected_values:
# rate_threshold: 0.01
# min_occurrences: 20
# rules:
# - param_name: value
# event_name: purchase
# min: 0
# max: 20000
# - param_name: transaction_id
# regex: '^[0-9]{9}$'
# - param_name: currency
# allowed: [EUR, GBP, CHF]
# rate_threshold: 0 # per-rule override: any non-matching currency raises the issue

# Opt-in assertions: a failing assertion ends the run FAILED so the Dataform error-email digest reports it.
# By default an issue alerts once, when it is new (alert_on: new_only); set alert_on: always to alert on every run.
# assertions:
# pii:
# enabled: true
# alert_on: new_only # or always
# junk_values:
# enabled: true
# alert_on: new_only
# type_mismatch:
# enabled: true
# alert_on: new_only
# missing_days:
# enabled: true
# alert_on: new_only
# unexpected_values:
# enabled: true
# alert_on: new_only

# Cross-cloud Parquet export to GCS: inherits the global GCS_EXPORT_* settings;
# set any field to override it for this module only.
GCS_EXPORT:
enabled: false
bucket: ""
prefix: ""
format: ""
compression: ""
layers: ""
exclude: []
Installs from before v2.2.17

Older installs keep their full copy of the previous config. It keeps working: every new key is optional and takes its core default. Lines that block a new default are reported as config_outdated rows in the issues table. See Upgrading from earlier versions.

Configuration Options​

Essential Settings​

SettingDescriptionExample
enabledEnable/disable the moduletrue or false
versionConfiguration version for tracking changes (set by Superform Labs team)3
dependenciesList other modules that the current module depends on (set by Superform Labs team)["ga4"]

All Options and Defaults​

Defaults come from the core config.yaml. Add a key to your custom file only when you want a different value.

SettingDefaultDescription
exclude_params[]Parameter names to leave out of the output tables
exclude_category[]Categories to leave out: standard, custom, discovered
exclude_events / include_events[]Events to skip, or the only events to keep (use one of the two)
max_lookback_days7Maximum days a full refresh looks back
start_date'9999-01-01'Earliest date a full refresh processes
sample_value_count_daily5Sample values per parameter per day
sample_value_count_agg50Sample values per parameter in the aggregated table
junk_detection.enabledtrueTurn junk value detection on or off
junk_detection.exact_valuesundefined, null, NaN, [object Object], (not set), empty stringValues counted as junk (exact match)
junk_detection.regex_patterns^\{\{.*\}\}$, ^%%.*%%$Values counted as junk (regex): unresolved GTM variables and template placeholders
junk_detection.rate_threshold0.05Junk share of a parameter's occurrences on one day that raises junk_values
junk_detection.min_occurrences50Minimum occurrences that day before junk_values can be raised
expected_values.enabledtrueTurn expected-value checks on or off
expected_values.rules[]Rules a parameter's values should follow - see Expected Values
expected_values.rate_threshold0.01Share of a parameter's occurrences on one day that must break a rule to raise unexpected_values; a rule can override it
expected_values.min_occurrences20Minimum occurrences that day before unexpected_values can be raised; a rule can override it
missing_days.min_missing_days2Minimum final days a parameter must be absent to raise missing_days
missing_days.min_missing_share0.1Minimum share of the event's final days the parameter must be absent
issues.active_within_days3An issue is active while it was last detected within this many days of the latest report day
suppressions[]Accepted findings - see Suppressions
assertions.*all enabled: falseOpt-in alerts - see Assertions
assertions.<name>.alert_onnew_onlynew_only fails the run once per new issue; always fails every run while the issue is in the window - see Assertions
pii_detection.enabledtrueTurn PII detection on or off (existing installs: see Upgrading)
pii_detection.mask_pii_in_samplesfalseReplace detected PII in sample values with [MASKED-<type>]
pii_detection.url_query_key_min_value_length3Minimum value length for a PII-looking URL query key to count
pii_detection.known_pii_param_names46 namesExact-match parameter names flagged as PII
pii_detection.suspected_pii_param_patterns13 patternsRegex patterns for parameter name variations
pii_detection.pii_value_patterns17 patterns, only email enabledValue-level detection patterns with per-pattern toggle
pii_detection.test_values50 valuesInput for the pattern tester view
GCS_EXPORTinherits the global settingsPer-module override of the cross-cloud export

Date Range Control​

max_lookback_days: 7
start_date: '9999-01-01'

These two settings decide where a full refresh (rebuild) of report_daily starts. The module uses the earlier of the two dates:

  • max_lookback_days: today minus this many days
  • start_date: a fixed date. The default 9999-01-01 means "not set": it is never the earlier date, so max_lookback_days decides
start_datemax_lookback_daysA rebuild starts at
9999-01-01 (default)7 (default)7 days ago
9999-01-013030 days ago
'2025-09-01'302025-09-01

By default a rebuild stays small and cheap: older parameter data matters little for detection. Set a real start_date only when you want a rebuild to cover a longer history - it scans every day from that date. Normal daily runs are incremental and are not affected by either setting.

BigQuery Cost Impact

These date settings determine how much raw GA4 data gets scanned - use shorter ranges to reduce processing costs. Querying the output parameter detection tables will be rather low cost as they are already aggregated.

Filtering​

Exclude Specific Parameters​

Skip tracking for known parameters you don't want to monitor.

BigQuery Cost Impact

Parameter filtering only affects what appears in the output tables - it doesn't reduce BigQuery processing costs since the module still scans all raw GA4 data within the configured date range.

exclude_params: ["debug_mode", "test_parameter"]

Exclude Parameter Categories​

Skip tracking for known categories you don't want to monitor. Useful if you are not interested in 'standard' parameters for example.

BigQuery Cost Impact

Parameter category filtering only affects what appears in the output tables - it doesn't reduce BigQuery processing costs since the module still scans all raw GA4 data within the configured date range.

exclude_category: ["standard"]

Filter by parameter type:

  • standard: Built-in GA4 parameters
  • custom: Parameters you've configured in includes/custom/modules/ga4/config.js
  • discovered: Parameters found in data but not configured

Event-Based Filtering​

Skip tracking for events you don't want to monitor.

BigQuery Cost Impact

Event filtering only affects what appears in the output tables - it doesn't reduce BigQuery processing costs (unless your raw GA4 tables are clustered by event_name!) since the module still scans all raw GA4 data within the configured date range.

# Skip parameters from certain events
exclude_events: ["session_start", "first_visit", "user_engagement"]

# OR focus on specific events only
include_events: ["purchase", "add_to_cart"]
Mutually Exclusive

Use either exclude_events OR include_events, not both simultaneously.

Sample Value Configuration​

These settings control how many example values to collect for each parameter. Samples are ranked by frequency, so you'll see the most commonly occurring values first.

sample_value_count_daily: 5
sample_value_count_agg: 50

Control how many sample values to collect:

  • sample_value_count_daily: Samples per parameter per day
  • sample_value_count_agg: Total samples across all dates. The aggregated table ranks values by their summed occurrences within the daily top samples

With pii_detection.mask_pii_in_samples: true, detected PII is replaced with [MASKED-<type>] in all sample values.

Multi-Property Support​

When you have multiple GA4 properties configured via EXTRA_GA4_DATASETS_ARRAY in the GA4 module, the Parameter Detection module automatically tracks parameters per property. All output tables include property_id and property_name columns, enabling per-property parameter auditing.

No additional configuration is needed - multi-property detection activates automatically when the GA4 module is set up with multiple properties.

Junk Value Detection​

Junk values are placeholders a tag sends when a variable is undefined, such as undefined, null, [object Object] or an unresolved GTM variable like {{Page Path}}. The module counts them per parameter, event and day (junk_occurrence_count). A row gets the junk_values issue when the junk share reaches rate_threshold and the parameter has at least min_occurrences occurrences that day.

junk_detection:
rate_threshold: 0.05
min_occurrences: 50

Standard item fields (item_id, item_name, item_category and so on) drop (not set) before detection, so it never counts as junk for them. Lists such as exact_values and regex_patterns are appended to the core defaults; set enabled: false to turn junk detection off.

Missing Days​

A parameter gets the missing_days issue for an event when it is absent on at least min_missing_days of the final days the event fired (counted from the first day the parameter was seen on that event), and that share reaches min_missing_share.

missing_days:
min_missing_days: 2
min_missing_share: 0.1

Only final days count (outside the DATA_IS_FINAL_DAYS window), so a late-arriving day does not raise the issue.

Expected Values​

Junk detection and type checks catch values that are broken. Expected values catch values that look fine but are wrong: a value of 1,000,000 on purchase, a transaction_id in the wrong format, or a currency your shop does not sell in. Wrong values like these flow into revenue and attribution reports without an error.

Write one rule per parameter. A rule needs param_name and at least one check:

expected_values:
rules:
- param_name: value
event_name: purchase # optional: only this event
min: 0
max: 20000
- param_name: transaction_id
event_name: purchase
regex: '^[0-9]{12}$'
- param_name: currency
allowed: [EUR, GBP, CHF]
rate_threshold: 0 # optional: any wrong currency raises the issue
KeyRequiredA value breaks the rule when
param_nameYes- (the parameter the rule covers)
regexOne of the four checksIt does not match. Uses REGEXP_CONTAINS, so anchor the pattern (^...$) for a full match
allowedOne of the four checksIt is not in the list (case-sensitive)
min / maxOne of the four checksIt is not a number, or it is outside the bounds (inclusive)
event_nameNoLimits the rule to one event; all events when left out
param_sourceNoevent_params_array, user_property_array or items_array; all sources when left out
rate_thresholdNo- (overrides expected_values.rate_threshold for this rule; a number from 0 to 1)
min_occurrencesNo- (overrides expected_values.min_occurrences for this rule; a whole number)

How the checks work:

  • Every value is checked, not only the stored samples, so a rare wrong value is still counted. The count lands in unexpected_occurrence_count per parameter, event and day.
  • A value must pass every rule that covers it. Several rules for the same parameter and event combine.
  • Junk is counted once. A junk placeholder (such as undefined) counts as junk only, not also as unexpected.
  • NULL means not checked. unexpected_occurrence_count is NULL where no rule covers the parameter, and 0 where it was checked and every value passed.
  • The issue needs a real share. A row gets the unexpected_values issue when at least rate_threshold (default 0.01) of its occurrences break a rule, with at least min_occurrences (default 20) occurrences that day. Set both per rule where the tolerance differs: rate_threshold: 0 raises the issue for any wrong value.
  • Overlapping rules: the lowest threshold wins. Where several rules cover the same parameter and event, the row uses the lowest rate_threshold and the lowest min_occurrences of those rules, so the most sensitive rule decides. The issues table shows the threshold that applied in evidence_threshold.
  • Rules are checked at compile time. A rule with no check, an unknown key, a bound that is not a number, a rate_threshold outside 0 to 1 or a fractional min_occurrences (also at block level), min greater than max, an allowed entry that is neither a string nor a whole number, or a regex that BigQuery cannot run (lookarounds, backreferences, a line break) stops compilation with an error that names the rule.
tip

Calibrate a rule on your own data before you turn on its assertion: check the range, format or value list of the last few weeks, then set the bounds with some headroom. A rule that is too tight raises an issue every day.

Good to know:

  • Item parameters with the same name. Without param_source, a rule also covers an item parameter of the same name - for example currency on items as well as on the event. Set param_source to limit it.
  • Long numeric IDs. min and max compare as floating point (about 15 significant digits). Check long numeric IDs with regex instead.
  • Quote values that look like numbers. In allowed, write '007' rather than 007: YAML reads an unquoted 007 as the number 7. Decimal numbers are rejected for the same reason.
  • History. A rule applies from the next run. To apply it to past days, reprocess ga4_parameter_detection_report_daily.

PII Detection​

The PII detection feature scans your GA4 parameters for personally identifiable information - both in parameter names and in actual collected values. This helps you identify privacy risks before they become compliance issues.

PII detection is on by default. To turn it off, or to mask detected values, set the keys under pii_detection in your custom file:

pii_detection:
enabled: false # only if you want to turn PII detection off
mask_pii_in_samples: true # replace detected PII in sample values

How it works​

PII detection operates on three levels:

  1. Parameter name detection: Checks the names of non-standard parameters against 46 known PII names (exact match, case-insensitive, e.g. email, phone_number, ssn, credit_card) and 13 suspected name patterns. The patterns are anchored on a name boundary: user_email, phone_number, lastname, date_of_birth and street_address match; is_mobile, email_opt_in, license_type and birth_year do not. Hits get the type parameter_name_indicates_pii.

  2. URL query keys: For page_location and page_referrer, the decoded query and fragment keys are checked against the same name rules. A URL like https://www.example.com/signup?email_address=... gets the type url_query_param_name_indicates_pii. A key only counts when its value has at least url_query_key_min_value_length characters (default 3), so short values such as ?ssn=en are ignored.

  3. Value pattern detection: Scans values with 17 configurable regex patterns with optional SQL validation. Values are percent-decoded twice before the scan, so jane.doe%40example.com and double-encoded %2540 are caught. For page_location and page_referrer the patterns run on the decoded query and fragment values, and the email pattern also runs on the decoded URL path (e.g. /account/jane.doe@example.com/). Other standard parameters are never flagged. Credit card detection uses both a regex pattern and a Luhn checksum validation to reduce false positives.

Detection categories​

Only email is enabled by default. Enable the others per pattern (copy the full entry from the core config into your custom file and set enabled: true).

CategoryPatternsExamples
Contactemail, phone, phone_intluser@example.com, +1-555-0123
Financialcredit_card, credit_card_no_sep, ibanCard numbers with Luhn validation, IBANs
Government IDssn, sin_canada, nino_uk123-45-6789, AB 12 34 56 C
Networkip_address, ip_address_v6, mac_address192.168.1.1, 00:1A:2B:3C:4D:5E
Locationpostal_code, postal_code_uk, postal_code_germany90210-1234, SW1A 1AA
Authenticationjwt_token, api_keyJWT tokens, API key patterns

Configuration options​

SettingDescriptionDefault
pii_detection.enabledEnable PII scanningtrue
pii_detection.mask_pii_in_samplesReplace detected PII in sample values with [MASKED-<type>] (in report_daily, aggregated and issues)false
pii_detection.url_query_key_min_value_lengthMinimum value length for a PII-looking URL query key to count3
pii_detection.known_pii_param_namesExact-match parameter names flagged as PII46 built-in names
pii_detection.suspected_pii_param_patternsRegex patterns for parameter name variations13 built-in patterns
pii_detection.pii_value_patternsValue-level detection patterns with per-pattern toggle17 built-in patterns

Your known_pii_param_names and suspected_pii_param_patterns entries are added to the built-in lists.

Each value pattern can be individually enabled/disabled and supports:

  • regex - the detection pattern
  • additional_sql - extra SQL validation (e.g., digit count checks for phone numbers)
  • luhn_check - Luhn algorithm validation for credit card numbers
  • exclude_params - skip this pattern for specific parameters

Output​

PII detection fills three columns in ga4_parameter_detection_report_daily:

ColumnTypeDescription
has_pii_detectedBOOLWhether PII was detected in this parameter's name or values
pii_types_detectedSTRINGComma-separated list of detected PII types (e.g., email, url_query_param_name_indicates_pii)
pii_detection_reasonSTRINGWhy PII was flagged, for the highest-priority type (name rules first, then value patterns in config order)

A PII finding also appears as a pii issue (severity critical) in the issues table.

Pattern Tester​

The ga4_parameter_detection_pii_pattern_tester view lets you validate detection patterns against test values before deploying. It shows which patterns match each test value, including regex matches and additional SQL validation results. The core config includes 50 test values covering all pattern categories.

Issue Model​

The module turns its findings into issues with a type and a severity. Each issue is tracked per parameter, source and event (PII per parameter), so you can see when it started, whether it is still active, and how to fix it.

Parameter status​

Every row carries a param_status:

StatusMeaning
discoveredFound in the data but not configured in includes/custom/modules/ga4/config.js
configured_foundConfigured and found in the data
configured_absentConfigured but not found (on that day in report_daily; on any day in aggregated)

Issue types​

Issue typeSeverityRaised whenTypical fix
piicriticalA parameter name, URL query key or value looks like PIIRemove the value at the source (GTM/tracking code); for a false positive, disable the pattern or add the parameter to its exclude_params
type_mismatchwarningThe configured type cannot store some occurrences (lost_occurrence_count > 0)Change the type in config.js - see ga4_parameter_detection_config_suggestions
junk_valueswarningThe junk share reaches junk_detection.rate_threshold with at least min_occurrences occurrencesFix the tag variable that sends the placeholder
unexpected_valueswarningThe share of values breaking an expected-values rule reaches expected_values.rate_threshold with at least min_occurrences occurrencesFix the tag, or the rule if the new values are correct
missing_daysinfoThe parameter is absent on enough final days the event fired (see Missing Days)Check tag or site changes around first_missing_date
type_differenceinfoThe found types differ from the configured type, but no values are lostUsually none
multiple_data_typesinfoMore than one data type is found, but no values are lostUsually none; standardize collection if needed
config_outdatedinfoA line in your custom config blocks a new defaultDelete the line named in the issue

What each configured type keeps (anything else counts as lost):

Configured typeKeeps
stringEvery value
intInteger values
decimalInteger and floating-point values that fit NUMERIC
doubleDouble values
floatFloat values
tip

If unsure, use decimal in config.js for numbers and string for mixed values. GA4 parses numbers in three ways (int, float, double); decimal keeps all three.

Where issues show up​

  • report_daily.issue_types: raw detections per day and event (pii, type_mismatch, junk_values, unexpected_values, type_difference, multiple_data_types). Not suppression-aware.
  • aggregated: unsuppressed issue types per parameter and event (plus missing_days), the highest issue_severity, and the suppression columns.
  • issues: one row per issue with first/last detection date, is_active, evidence and a description with the suggested fix. Start here for an audit.

An issue is active while it was last detected within issues.active_within_days (default 3) of the latest report day. After that it gets a resolved_date.

Suppressions​

Use suppressions for known, accepted findings. A suppressed issue stays in report_daily.issue_types as raw evidence, but is marked is_suppressed in aggregated and issues and skipped by the assertions.

suppressions:
- param_name: search_term
issue_types: [pii]
reason: "Search box echoes typed emails; cleaned in GTM, ticket ABC-123"
param_source: event_params_array
event_name: search
expires_on: '2027-01-31'
KeyRequiredDescription
param_nameYesParameter the suppression applies to
issue_typesYesNon-empty list of issue types (see Issue types)
reasonYesWhy the finding is accepted; shown as suppression_reason
param_sourceNoevent_params_array, user_property_array or items_array; any source when left out
event_nameNoEvent to limit the suppression to; any event when left out
property_idNoGA4 property to limit the suppression to; any property when left out
expires_onNoLast day the suppression applies (YYYY-MM-DD)

The list is validated at compile time: a missing required key, an unknown issue type or an invalid expires_on stops compilation with an error that names the entry.

Assertions​

Five opt-in assertions turn issues into alerts. A failing assertion ends the workflow run as failed, so the email alerts for Dataform errors report it. The alert message contains parameter names, events, issue types and counts only - never sample values.

AssertionFails whenWindow
piiA parameter carries potential PII on any day of the windowlookback_days: 3, provisional days included
junk_valuesA parameter carries junk values on at least min_consecutive_days: 2 consecutive dayslookback_days: 7, final days only
unexpected_valuesA parameter carries values breaking an expected-values rule on at least min_consecutive_days: 2 consecutive dayslookback_days: 7, final days only
type_mismatchA configured type loses occurrences on any daylookback_days: 7, final days only
missing_daysA parameter present on at least min_prior_presence: 0.5 of the event's days, and on at least min_prior_present_days: 2 days, in the 28 days before the window is absent on at least min_missing_days: 2 dayslookback_days: 7, final days only; needs min_baseline_days: 7 days of data in the 28-day baseline

Suppressed issues never fail an assertion. With alert_on: new_only (the default), a finding only fails the run when the same issue was absent in the 28 days before the window - one alert per new problem. The issues table keeps showing it until you fix or suppress it. Set alert_on: always to fail every run while the issue is in the window.

assertions:
pii:
enabled: true
type_mismatch:
enabled: true
alert_on: always

The missing_days baseline reads report_daily, so rows written before an update count. Two floors keep it quiet on thin history: a parameter seen on a single day never counts as "used to carry" (min_prior_present_days), and nothing is judged until the property has min_baseline_days days of detection data in the baseline - for example the first week after a new install.

Assertions only run when the module itself is enabled. The assertion tables are written to your quality dataset.

Table Structures​

ga4_parameter_detection_report_daily​

Granularity: One row per date, parameter, source and event

Incremental table (partitioned by event_date) that maintains a daily record of all identified parameters, including sample values, usage statistics and detected issues.

ColumnDescription
property_idIdentifier of the GA4 property this parameter belongs to
property_nameDisplay name of the GA4 property
event_dateThe date when the event was logged (YYYY-MM-DD format)
param_nameName of the parameter being tracked
param_sourceSource array of the parameter (e.g., event, item, user property)
event_nameName of the event this parameter belongs to
param_categoryCategory classification of the parameter (e.g., custom, standard, discovered)
param_data_type_configured_asThe data type this parameter was configured as in config.js (not_configured for discovered parameters). For a parameter listed several times, the first entry
param_data_type_found_in_data_asThe actual data type found for this parameter in the collected data
distinct_data_type_countNumber of distinct data types observed for this parameter
found_in_dataWhether this parameter was actually found in the collected event data on this date
has_potential_issueDeprecated - legacy flag, kept unchanged so existing dashboards do not move. Use issue_types and param_status
issue_descriptionDeprecated - legacy description of has_potential_issue. Use issue_types and the issues table
event_countOccurrences of this parameter on this event on this date
last_received_timestampTimestamp of when this event-parameter combination was last received on this date
sample_valuesArray of sample values (ordered by descending occurrence count) with value and occurrence_count fields
has_pii_detectedWhether PII was detected in this parameter's name or values
pii_types_detectedComma-separated list of detected PII types
pii_detection_reasonWhy PII was flagged, for the highest-priority type
is_finalIndicates if the data is final or subject to change (based on 72h window)

Columns added in v2.2.17:

ColumnTypeDescription
param_statusSTRINGdiscovered, configured_found or configured_absent (see Parameter status)
issue_typesARRAY<STRING>Raw issue types detected on this row; not suppression-aware
occurrence_countINT64Occurrences of this parameter on this event on this date
junk_occurrence_countINT64Occurrences whose value is a junk placeholder
unexpected_occurrence_countINT64Occurrences whose value breaks an expected-values rule; junk excluded. NULL when no rule covers the parameter on this event
lost_occurrence_countINT64Occurrences the configured type(s) cannot store; 0 for discovered parameters and standard item fields
type_occurrence_countsARRAY<STRUCT<data_type STRING, occurrence_count INT64>>Occurrences per observed data type (string, int, double, float)
type_loss_by_configured_typeARRAY<STRUCT<configured_type STRING, lost_occurrence_count INT64>>Lost occurrences per configured type, for parameters listed with more than one type
value_sketchBYTESHLL++ sketch of the distinct values; merged into unique_values_count in the aggregated table
host_event_countINT64Number of times the event fired on this date (with or without the parameter)
host_item_countINT64Number of items across the event's occurrences on this date
host_eligible_item_countINT64Number of items with an item_id or item_name on this date (denominator for standard item fields)
detection_versionINT64Version of the detection logic that produced the row; NULL on rows built before v2.2.17

ga4_parameter_detection_aggregated​

Granularity: One row per property, parameter, source and event across all dates

Aggregated table showing parameter status, data types, issues, coverage and sample values across the entire observation period. Configured parameters that were never found appear once, with event_name = '(not in use)' and param_status = 'configured_absent'.

ColumnDescription
property_idIdentifier of the GA4 property this parameter belongs to
property_nameDisplay name of the GA4 property
event_nameName of the event this parameter belongs to; (not in use) for parameters never found
param_nameName of the parameter
param_data_type_configured_asThe data type this parameter was configured as in config.js, on the latest report day
param_data_type_found_in_data_asComma-separated distinct data types observed over all report days; (not in use) when never found
param_categoryCategory classification of the parameter (e.g., custom, standard, discovered)
param_sourceSource array of the parameter (e.g., event_params_array, items_array, user_property_array)
found_in_dataWhether this parameter was found on any report day
has_potential_issueDeprecated - legacy flag. Use issue_types
issue_descriptionDeprecated - legacy description. Use the issues table
first_seen_dateFirst date when this parameter was found; NULL for configured_absent rows
last_seen_dateLast date when this parameter was found; NULL for configured_absent rows
days_observedReport days the parameter was found (0 for configured_absent rows)
days_with_eventsNumber of days this event-parameter combination appeared in the data
missing_datesLegacy: total_actual_days - days_observed. Use missing_days
events_with_param_countCount of unique event names where this parameter appears
event_countTotal number of times this event occurred with this parameter
last_received_timestampTimestamp of when this event-parameter combination was last received
sample_valuesTop sample values as a comma-separated string, ranked by occurrences within the daily top samples
sample_values_arrayThe same sample values as an array
unique_values_countApproximate number of distinct values (HLL++, about 1% error); NULL until rows from v2.2.17 exist
total_actual_daysTotal number of report days of the property. Controlled by start_date and max_lookback_days config variables
has_pii_detectedPII flag of the latest report day the parameter was found
pii_types_detectedPII types of the latest report day with PII
days_with_pii_detectedDistinct report days with PII detected

Columns added in v2.2.17:

ColumnDescription
param_statusdiscovered, configured_found or configured_absent (never found on any day)
issue_typesUnsuppressed issue types for this parameter and event, most severe first, including missing_days
issue_severityHighest unsuppressed severity: critical, warning or info; NULL without issues
is_suppressedTRUE when every detected issue type is covered by an active suppression
suppressed_issue_typesIssue types covered by an active suppression
suppression_reasonReasons of the matching suppressions
issue_days_countEvaluated days with at least one unsuppressed issue
last_issue_dateLatest evaluated day with an unsuppressed issue
event_param_coverage_rateShare of the event's occurrences carrying the parameter (event parameters and user properties)
item_coverage_rateShare of items carrying the parameter (item parameters)
fired_daysEvaluated days the event fired on or after the parameter was first seen on it
missing_daysFinal fired days on which the parameter was absent from the event
first_missing_date / last_missing_dateFirst and last absent day
occurrence_countOccurrences over the evaluated days
junk_occurrence_countJunk-placeholder occurrences over the evaluated days
junk_value_ratejunk_occurrence_count / occurrence_count
unexpected_occurrence_countOccurrences breaking an expected-values rule over the evaluated days; NULL when no rule covers the parameter on this event
unexpected_value_rateunexpected_occurrence_count / occurrences on the days the rule was checked
lost_occurrence_countOccurrences the configured type(s) could not store
type_loss_by_configured_typeLost occurrences per configured type
type_occurrence_countsOccurrences per observed data type
observation_start_date / observation_end_dateFirst and latest evaluated day of the property
evaluated_daysNumber of evaluated days of the property
evaluated_days_with_paramEvaluated days the parameter was present on this event

"Evaluated days" are report days built with v2.2.17 or later (detection_version is set). Older days have no data for these columns until you reprocess them.

ga4_parameter_detection_issues​

Granularity: One row per property, parameter, source, event and issue type

Table rebuilt on every run from report_daily. It lists every issue with its severity, history, evidence and a suggested fix - the place to start an audit. PII issues are per parameter (event_name = '(all)'). config_outdated rows name a line in your custom config (param_source = 'config', param_name = the config key).

ColumnDescription
property_idIdentifier of the GA4 property
property_nameDisplay name of the GA4 property; NULL for config_outdated rows
param_nameName of the parameter; for config_outdated rows the config key (e.g. pii_detection.enabled)
param_sourceSource array of the parameter; config for config_outdated rows
event_nameEvent the issue was detected on; (all) for parameter-level issues (pii, config_outdated)
issue_typepii, type_mismatch, junk_values, unexpected_values, missing_days, type_difference, multiple_data_types or config_outdated
issue_severitycritical, warning or info
first_detected_dateFirst day the issue was detected within the evaluated window
last_detected_dateLast day the issue was detected
days_detectedNumber of days the issue was detected
consecutive_daysLength of the run of consecutive detection days that ends on last_detected_date
is_activeWhether last_detected_date is within issues.active_within_days of the latest evaluated day
resolved_dateDay after last_detected_date once the issue is no longer active; NULL while active
is_suppressedWhether an active suppression covers this issue
suppression_reasonReason of the matching suppression(s)
evidence_numeratorJunk occurrences, unexpected occurrences, lost occurrences, absent final days or days with PII, depending on the issue type
evidence_denominatorOccurrences, final fired days or evaluated days, depending on the issue type
evidence_thresholdConfigured threshold the evidence was compared against; for unexpected_values the lowest rate_threshold of the rules covering the parameter and event; NULL where not applicable
descriptionHuman-readable description with counts and the suggested fix
pii_types_detectedComma-separated PII types, for pii issues
pii_detection_reasonWhy PII was flagged, for pii issues
sample_valueMost frequent sample value on the latest detection day (masked for pii issues when mask_pii_in_samples is on); for config_outdated the superseded config value
observation_start_dateFirst evaluated day of the property
observation_end_dateLatest evaluated day of the property
evaluated_daysNumber of evaluated days of the property

Example - active, unsuppressed issues by severity:

SELECT issue_severity, issue_type, param_name, event_name, description
FROM `your-project.your_outputs_dataset.ga4_parameter_detection_issues`
WHERE is_active AND NOT is_suppressed
ORDER BY CASE issue_severity WHEN 'critical' THEN 0 WHEN 'warning' THEN 1 ELSE 2 END, param_name

ga4_parameter_detection_daily_health​

Granularity: One row per property, date, parameter, source and event

Table partitioned by event_date and rebuilt on every run. It has a row for every day the event fired on or after the parameter was first seen on it - including days the parameter was absent (is_present = FALSE, counts 0). Use it to chart a parameter's coverage and junk share over time, or to find the day a parameter disappeared. Always filter on event_date.

ColumnDescription
property_idIdentifier of the GA4 property
property_nameDisplay name of the GA4 property
event_dateDay the event fired
param_nameName of the parameter
param_sourceSource array of the parameter
param_categorystandard, custom or discovered, from its latest daily row
event_nameEvent the parameter is evaluated on
first_seen_on_event_dateFirst day the parameter was seen on this event; rows start here
is_presentWhether the parameter was present on this event on this day
event_countOccurrences of the parameter on this event on this day; 0 when absent
host_event_countNumber of times the event fired on this day
host_item_countNumber of items across the event's occurrences on this day
host_eligible_item_countNumber of items with an item_id or item_name on this day
event_param_coverage_rateevent_count / host_event_count for event parameters and user properties
item_coverage_rateItem coverage for item parameters (standard item fields: of items with an id or name)
occurrence_countOccurrences on this day; 0 when absent
junk_occurrence_countJunk-placeholder occurrences on this day; 0 when absent
junk_value_ratejunk_occurrence_count / occurrence_count; NULL when absent
unexpected_occurrence_countOccurrences breaking an expected-values rule on this day; NULL when no rule covers the parameter on this event, or when absent
unexpected_value_rateunexpected_occurrence_count / occurrence_count; NULL when not checked or absent
lost_occurrence_countOccurrences the configured type(s) cannot store; 0 when absent
has_pii_detectedWhether potential PII was detected for the parameter on this day
issue_typesRaw issue types of the daily row; not suppression-aware
is_finalWhether the day is outside the DATA_IS_FINAL_DAYS window

ga4_parameter_detection_pii_pattern_tester​

Granularity: One row per test value and matching pattern

A diagnostic view that validates all configured PII detection patterns against the pii_detection.test_values list. Use this to verify that patterns work correctly before you enable them.

ColumnDescription
test_valueThe sample value being tested
pattern_nameName of the PII pattern (e.g., email, credit_card)
pattern_enabledWhether this pattern is currently enabled in config
regex_matchesWhether the regex pattern matched the test value
additional_sql_passesWhether the additional SQL validation passed (if configured)
is_detectedFinal detection result (true only if all checks pass)

ga4_parameter_detection_config_suggestions​

Granularity: One row per property and parameter source

This view generates ready-to-use configuration code for parameters found in your data but not yet configured, listing the most frequent events first. It also adds commented type-fix lines for configured parameters whose type loses values. The output can be copied directly into your config.js file.

Example output:

CUSTOM_USER_PROPERTIES_ARRAY: [
{ name: "wordpress_role", type: "string", description: "found in: page_view, click_to_store, expand_section" }
],
CUSTOM_ITEM_PARAMS_ARRAY: [
{ name: "variant_id", type: "int", description: "found in: view_item, add_to_cart, view_cart, purchase" }
],
CUSTOM_EVENT_PARAMS_ARRAY: [
{ name: "gtm_version", type: "string", description: "found in: page_view, click, form_start, form_submit, video_start" },
{ name: "page_id", type: "int", description: "found in: page_view, click, form_start, form_submit, video_start" },
// type fix: order_value configured as int (loses 120), found as double,int - change to type: "decimal" (decimal keeps int and double values that fit NUMERIC; use string if values overflow)
],

Discovered and Configured-but-Absent Parameters​

Two findings come from param_status rather than an issue type.

Discovered parameters​

Detection: param_status = 'discovered'

Parameters exist in your GA4 data but aren't configured in your config.js file. Assess their analytical value and decide whether to add them to your configuration, exclude them via the exclude_params setting, or possibly even modify your GA4 tracking to stop collecting them.

Resolution Options:

  • Add to CUSTOM_EVENT_PARAMS_ARRAY, CUSTOM_USER_PROPERTIES_ARRAY, or CUSTOM_ITEM_PARAMS_ARRAY
  • Use ga4_parameter_detection_config_suggestions view for ready-to-copy configuration code
  • Add to exclude_params list if uninteresting
  • Stop collecting them if they are not needed

Configured but absent parameters​

Detection: param_status = 'configured_absent'

Parameters are configured but don't appear in your actual GA4 data. The configured date range will greatly affect this flag since some parameters might not be recently collected, but could be relevant historically.

Resolution Options:

  • Verify GA4 implementation is sending the parameter
  • Remove unused parameter from configuration
  • Check if parameter was recently added and hasn't appeared yet

Upgrading from Earlier Versions​

To v2.2.18​

No rebuild is needed. The new unexpected_occurrence_count column is added to report_daily on the first run, and rules apply from that run.

If your report_daily history predates v2.2.17, reprocess it. Rows written before v2.2.17 have no host counts and no issue_types. Until they are filled, the junk_values, type_mismatch and pii assertions report issues that already existed as new for about a week. Reprocess the full history with REPROCESS_START_DATE / REPROCESS_END_DATE on ga4_parameter_detection_report_daily, in batches for long ranges.

warning

A full rebuild recreates report_daily only from the rebuild start date - with the default settings the last 7 days. Older days are dropped from the table. Reprocessing keeps them, and the missing_days baseline and your trend reports use them. A rebuild is fine if your start_date already covers the history you want to keep.

To v2.2.17​

The update to v2.2.17 needs no rebuild. What to know:

  1. New columns are added automatically. On the first incremental run after the update, report_daily gets the 12 new columns in one ALTER TABLE. Existing rows are kept, with NULL in the new columns.
  2. Fill history by reprocessing. Rows built before v2.2.17 have no issue, coverage, junk or type-loss data, so aggregated and issues only evaluate days built with the new version. To fill a past range, reprocess it with REPROCESS_START_DATE and REPROCESS_END_DATE and the tag module_ga4_parameter_detection. Prefer reprocessing over a full rebuild: a full rebuild only covers the max_lookback_days / start_date range.
  3. PII detection stays as you set it. New installs have PII detection on. Older custom configs contain enabled: false under pii_detection, which still wins. Delete that line to use the new default, or keep it to stay opted out. Until then, the issues table shows a config_outdated row for pii_detection.enabled.
  4. Remove superseded name patterns. Older custom configs list the previous loose suspected_pii_param_patterns (such as .*mobile.*). Because lists are appended, they still over-match names like is_mobile. The issues table names them in a config_outdated row - delete those lines.
  5. Legacy columns are deprecated. has_potential_issue and issue_description (and missing_dates in aggregated) keep their previous logic so existing dashboards do not change. Move to param_status, issue_types and the issues table.

Some values change meaning or order with this version:

  • aggregated.unique_values_count is now an approximate distinct count instead of the number of stored samples.
  • aggregated.sample_values is ordered by occurrences instead of alphabetically.
  • aggregated.days_with_pii_detected counts days, so numbers can be smaller.
  • aggregated now includes configured parameters that were never found.
  • PII flags change: more URL findings (decoding, query keys, path emails), fewer name false positives.
  • Parameters listed several times in config.js (for example with two types) no longer produce duplicate rows.

AI Agent Skill​

The ga4df-parameter-audit agent skill lets an AI coding assistant run the audit for you. It reads the issues, aggregated and config_suggestions tables, reports findings from critical to info with evidence and a fix, and - after you confirm - applies config additions, type fixes and suppressions, and deletes config_outdated lines.

Data Studio Template​

tip

We created a free-to-use Data Studio template that was specifically designed to work with the GA4Dataform modules. Feel free to copy it and adapt it to your needs! You can find it here.

Template Features​

  • Parameter discovery dashboard
  • Potential issue flagging
  • Sample value analysis
  • Configuration suggestions
  • Trend analysis

Common Use Cases​

  1. Implementation Audits: Verify GA4 setup completeness and accuracy
  2. Data Quality Monitoring: Identify and resolve configuration issues
  3. Discovery Analysis: Find valuable parameters not yet configured
  4. Migration Validation: Ensure parameter parity when migrating setups
  5. Compliance Tracking: Monitor parameter usage for privacy compliance
  6. Performance Optimization: Identify unused parameters for cleanup