GA4 Parameter Detection
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,nullor 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_idandproperty_namecolumns
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.
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
enabledorrate_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 samename. Copy the whole entry from the core file and change what you need - an entry withoutname,regexandenabledstops 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: []
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​
| Setting | Description | Example |
|---|---|---|
enabled | Enable/disable the module | true or false |
version | Configuration version for tracking changes (set by Superform Labs team) | 3 |
dependencies | List 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.
| Setting | Default | Description |
|---|---|---|
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_days | 7 | Maximum days a full refresh looks back |
start_date | '9999-01-01' | Earliest date a full refresh processes |
sample_value_count_daily | 5 | Sample values per parameter per day |
sample_value_count_agg | 50 | Sample values per parameter in the aggregated table |
junk_detection.enabled | true | Turn junk value detection on or off |
junk_detection.exact_values | undefined, null, NaN, [object Object], (not set), empty string | Values counted as junk (exact match) |
junk_detection.regex_patterns | ^\{\{.*\}\}$, ^%%.*%%$ | Values counted as junk (regex): unresolved GTM variables and template placeholders |
junk_detection.rate_threshold | 0.05 | Junk share of a parameter's occurrences on one day that raises junk_values |
junk_detection.min_occurrences | 50 | Minimum occurrences that day before junk_values can be raised |
expected_values.enabled | true | Turn expected-value checks on or off |
expected_values.rules | [] | Rules a parameter's values should follow - see Expected Values |
expected_values.rate_threshold | 0.01 | Share 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_occurrences | 20 | Minimum occurrences that day before unexpected_values can be raised; a rule can override it |
missing_days.min_missing_days | 2 | Minimum final days a parameter must be absent to raise missing_days |
missing_days.min_missing_share | 0.1 | Minimum share of the event's final days the parameter must be absent |
issues.active_within_days | 3 | An 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: false | Opt-in alerts - see Assertions |
assertions.<name>.alert_on | new_only | new_only fails the run once per new issue; always fails every run while the issue is in the window - see Assertions |
pii_detection.enabled | true | Turn PII detection on or off (existing installs: see Upgrading) |
pii_detection.mask_pii_in_samples | false | Replace detected PII in sample values with [MASKED-<type>] |
pii_detection.url_query_key_min_value_length | 3 | Minimum value length for a PII-looking URL query key to count |
pii_detection.known_pii_param_names | 46 names | Exact-match parameter names flagged as PII |
pii_detection.suspected_pii_param_patterns | 13 patterns | Regex patterns for parameter name variations |
pii_detection.pii_value_patterns | 17 patterns, only email enabled | Value-level detection patterns with per-pattern toggle |
pii_detection.test_values | 50 values | Input for the pattern tester view |
GCS_EXPORT | inherits the global settings | Per-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 daysstart_date: a fixed date. The default9999-01-01means "not set": it is never the earlier date, somax_lookback_daysdecides
start_date | max_lookback_days | A rebuild starts at |
|---|---|---|
9999-01-01 (default) | 7 (default) | 7 days ago |
9999-01-01 | 30 | 30 days ago |
'2025-09-01' | 30 | 2025-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.
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.
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.
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 parameterscustom: Parameters you've configured inincludes/custom/modules/ga4/config.jsdiscovered: Parameters found in data but not configured
Event-Based Filtering​
Skip tracking for events you don't want to monitor.
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"]
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 daysample_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
| Key | Required | A value breaks the rule when |
|---|---|---|
param_name | Yes | - (the parameter the rule covers) |
regex | One of the four checks | It does not match. Uses REGEXP_CONTAINS, so anchor the pattern (^...$) for a full match |
allowed | One of the four checks | It is not in the list (case-sensitive) |
min / max | One of the four checks | It is not a number, or it is outside the bounds (inclusive) |
event_name | No | Limits the rule to one event; all events when left out |
param_source | No | event_params_array, user_property_array or items_array; all sources when left out |
rate_threshold | No | - (overrides expected_values.rate_threshold for this rule; a number from 0 to 1) |
min_occurrences | No | - (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_countper 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_countis 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_valuesissue when at leastrate_threshold(default0.01) of its occurrences break a rule, with at leastmin_occurrences(default20) occurrences that day. Set both per rule where the tolerance differs:rate_threshold: 0raises 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_thresholdand the lowestmin_occurrencesof those rules, so the most sensitive rule decides. Theissuestable shows the threshold that applied inevidence_threshold. - Rules are checked at compile time. A rule with no check, an unknown key, a bound that is not a number, a
rate_thresholdoutside 0 to 1 or a fractionalmin_occurrences(also at block level),mingreater thanmax, anallowedentry 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.
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 examplecurrencyon items as well as on the event. Setparam_sourceto limit it. - Long numeric IDs.
minandmaxcompare as floating point (about 15 significant digits). Check long numeric IDs withregexinstead. - Quote values that look like numbers. In
allowed, write'007'rather than007: YAML reads an unquoted007as 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:
-
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_birthandstreet_addressmatch;is_mobile,email_opt_in,license_typeandbirth_yeardo not. Hits get the typeparameter_name_indicates_pii. -
URL query keys: For
page_locationandpage_referrer, the decoded query and fragment keys are checked against the same name rules. A URL likehttps://www.example.com/signup?email_address=...gets the typeurl_query_param_name_indicates_pii. A key only counts when its value has at leasturl_query_key_min_value_lengthcharacters (default3), so short values such as?ssn=enare ignored. -
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.comand double-encoded%2540are caught. Forpage_locationandpage_referrerthe patterns run on the decoded query and fragment values, and theemailpattern 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).
| Category | Patterns | Examples |
|---|---|---|
| Contact | email, phone, phone_intl | user@example.com, +1-555-0123 |
| Financial | credit_card, credit_card_no_sep, iban | Card numbers with Luhn validation, IBANs |
| Government ID | ssn, sin_canada, nino_uk | 123-45-6789, AB 12 34 56 C |
| Network | ip_address, ip_address_v6, mac_address | 192.168.1.1, 00:1A:2B:3C:4D:5E |
| Location | postal_code, postal_code_uk, postal_code_germany | 90210-1234, SW1A 1AA |
| Authentication | jwt_token, api_key | JWT tokens, API key patterns |
Configuration options​
| Setting | Description | Default |
|---|---|---|
pii_detection.enabled | Enable PII scanning | true |
pii_detection.mask_pii_in_samples | Replace detected PII in sample values with [MASKED-<type>] (in report_daily, aggregated and issues) | false |
pii_detection.url_query_key_min_value_length | Minimum value length for a PII-looking URL query key to count | 3 |
pii_detection.known_pii_param_names | Exact-match parameter names flagged as PII | 46 built-in names |
pii_detection.suspected_pii_param_patterns | Regex patterns for parameter name variations | 13 built-in patterns |
pii_detection.pii_value_patterns | Value-level detection patterns with per-pattern toggle | 17 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 patternadditional_sql- extra SQL validation (e.g., digit count checks for phone numbers)luhn_check- Luhn algorithm validation for credit card numbersexclude_params- skip this pattern for specific parameters
Output​
PII detection fills three columns in ga4_parameter_detection_report_daily:
| Column | Type | Description |
|---|---|---|
has_pii_detected | BOOL | Whether PII was detected in this parameter's name or values |
pii_types_detected | STRING | Comma-separated list of detected PII types (e.g., email, url_query_param_name_indicates_pii) |
pii_detection_reason | STRING | Why 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:
| Status | Meaning |
|---|---|
discovered | Found in the data but not configured in includes/custom/modules/ga4/config.js |
configured_found | Configured and found in the data |
configured_absent | Configured but not found (on that day in report_daily; on any day in aggregated) |
Issue types​
| Issue type | Severity | Raised when | Typical fix |
|---|---|---|---|
pii | critical | A parameter name, URL query key or value looks like PII | Remove the value at the source (GTM/tracking code); for a false positive, disable the pattern or add the parameter to its exclude_params |
type_mismatch | warning | The configured type cannot store some occurrences (lost_occurrence_count > 0) | Change the type in config.js - see ga4_parameter_detection_config_suggestions |
junk_values | warning | The junk share reaches junk_detection.rate_threshold with at least min_occurrences occurrences | Fix the tag variable that sends the placeholder |
unexpected_values | warning | The share of values breaking an expected-values rule reaches expected_values.rate_threshold with at least min_occurrences occurrences | Fix the tag, or the rule if the new values are correct |
missing_days | info | The parameter is absent on enough final days the event fired (see Missing Days) | Check tag or site changes around first_missing_date |
type_difference | info | The found types differ from the configured type, but no values are lost | Usually none |
multiple_data_types | info | More than one data type is found, but no values are lost | Usually none; standardize collection if needed |
config_outdated | info | A line in your custom config blocks a new default | Delete the line named in the issue |
What each configured type keeps (anything else counts as lost):
| Configured type | Keeps |
|---|---|
string | Every value |
int | Integer values |
decimal | Integer and floating-point values that fit NUMERIC |
double | Double values |
float | Float values |
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 (plusmissing_days), the highestissue_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'
| Key | Required | Description |
|---|---|---|
param_name | Yes | Parameter the suppression applies to |
issue_types | Yes | Non-empty list of issue types (see Issue types) |
reason | Yes | Why the finding is accepted; shown as suppression_reason |
param_source | No | event_params_array, user_property_array or items_array; any source when left out |
event_name | No | Event to limit the suppression to; any event when left out |
property_id | No | GA4 property to limit the suppression to; any property when left out |
expires_on | No | Last 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.
| Assertion | Fails when | Window |
|---|---|---|
pii | A parameter carries potential PII on any day of the window | lookback_days: 3, provisional days included |
junk_values | A parameter carries junk values on at least min_consecutive_days: 2 consecutive days | lookback_days: 7, final days only |
unexpected_values | A parameter carries values breaking an expected-values rule on at least min_consecutive_days: 2 consecutive days | lookback_days: 7, final days only |
type_mismatch | A configured type loses occurrences on any day | lookback_days: 7, final days only |
missing_days | A 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 days | lookback_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.
| Column | Description |
|---|---|
property_id | Identifier of the GA4 property this parameter belongs to |
property_name | Display name of the GA4 property |
event_date | The date when the event was logged (YYYY-MM-DD format) |
param_name | Name of the parameter being tracked |
param_source | Source array of the parameter (e.g., event, item, user property) |
event_name | Name of the event this parameter belongs to |
param_category | Category classification of the parameter (e.g., custom, standard, discovered) |
param_data_type_configured_as | The 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_as | The actual data type found for this parameter in the collected data |
distinct_data_type_count | Number of distinct data types observed for this parameter |
found_in_data | Whether this parameter was actually found in the collected event data on this date |
has_potential_issue | Deprecated - legacy flag, kept unchanged so existing dashboards do not move. Use issue_types and param_status |
issue_description | Deprecated - legacy description of has_potential_issue. Use issue_types and the issues table |
event_count | Occurrences of this parameter on this event on this date |
last_received_timestamp | Timestamp of when this event-parameter combination was last received on this date |
sample_values | Array of sample values (ordered by descending occurrence count) with value and occurrence_count fields |
has_pii_detected | Whether PII was detected in this parameter's name or values |
pii_types_detected | Comma-separated list of detected PII types |
pii_detection_reason | Why PII was flagged, for the highest-priority type |
is_final | Indicates if the data is final or subject to change (based on 72h window) |
Columns added in v2.2.17:
| Column | Type | Description |
|---|---|---|
param_status | STRING | discovered, configured_found or configured_absent (see Parameter status) |
issue_types | ARRAY<STRING> | Raw issue types detected on this row; not suppression-aware |
occurrence_count | INT64 | Occurrences of this parameter on this event on this date |
junk_occurrence_count | INT64 | Occurrences whose value is a junk placeholder |
unexpected_occurrence_count | INT64 | Occurrences whose value breaks an expected-values rule; junk excluded. NULL when no rule covers the parameter on this event |
lost_occurrence_count | INT64 | Occurrences the configured type(s) cannot store; 0 for discovered parameters and standard item fields |
type_occurrence_counts | ARRAY<STRUCT<data_type STRING, occurrence_count INT64>> | Occurrences per observed data type (string, int, double, float) |
type_loss_by_configured_type | ARRAY<STRUCT<configured_type STRING, lost_occurrence_count INT64>> | Lost occurrences per configured type, for parameters listed with more than one type |
value_sketch | BYTES | HLL++ sketch of the distinct values; merged into unique_values_count in the aggregated table |
host_event_count | INT64 | Number of times the event fired on this date (with or without the parameter) |
host_item_count | INT64 | Number of items across the event's occurrences on this date |
host_eligible_item_count | INT64 | Number of items with an item_id or item_name on this date (denominator for standard item fields) |
detection_version | INT64 | Version 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'.
| Column | Description |
|---|---|
property_id | Identifier of the GA4 property this parameter belongs to |
property_name | Display name of the GA4 property |
event_name | Name of the event this parameter belongs to; (not in use) for parameters never found |
param_name | Name of the parameter |
param_data_type_configured_as | The data type this parameter was configured as in config.js, on the latest report day |
param_data_type_found_in_data_as | Comma-separated distinct data types observed over all report days; (not in use) when never found |
param_category | Category classification of the parameter (e.g., custom, standard, discovered) |
param_source | Source array of the parameter (e.g., event_params_array, items_array, user_property_array) |
found_in_data | Whether this parameter was found on any report day |
has_potential_issue | Deprecated - legacy flag. Use issue_types |
issue_description | Deprecated - legacy description. Use the issues table |
first_seen_date | First date when this parameter was found; NULL for configured_absent rows |
last_seen_date | Last date when this parameter was found; NULL for configured_absent rows |
days_observed | Report days the parameter was found (0 for configured_absent rows) |
days_with_events | Number of days this event-parameter combination appeared in the data |
missing_dates | Legacy: total_actual_days - days_observed. Use missing_days |
events_with_param_count | Count of unique event names where this parameter appears |
event_count | Total number of times this event occurred with this parameter |
last_received_timestamp | Timestamp of when this event-parameter combination was last received |
sample_values | Top sample values as a comma-separated string, ranked by occurrences within the daily top samples |
sample_values_array | The same sample values as an array |
unique_values_count | Approximate number of distinct values (HLL++, about 1% error); NULL until rows from v2.2.17 exist |
total_actual_days | Total number of report days of the property. Controlled by start_date and max_lookback_days config variables |
has_pii_detected | PII flag of the latest report day the parameter was found |
pii_types_detected | PII types of the latest report day with PII |
days_with_pii_detected | Distinct report days with PII detected |
Columns added in v2.2.17:
| Column | Description |
|---|---|
param_status | discovered, configured_found or configured_absent (never found on any day) |
issue_types | Unsuppressed issue types for this parameter and event, most severe first, including missing_days |
issue_severity | Highest unsuppressed severity: critical, warning or info; NULL without issues |
is_suppressed | TRUE when every detected issue type is covered by an active suppression |
suppressed_issue_types | Issue types covered by an active suppression |
suppression_reason | Reasons of the matching suppressions |
issue_days_count | Evaluated days with at least one unsuppressed issue |
last_issue_date | Latest evaluated day with an unsuppressed issue |
event_param_coverage_rate | Share of the event's occurrences carrying the parameter (event parameters and user properties) |
item_coverage_rate | Share of items carrying the parameter (item parameters) |
fired_days | Evaluated days the event fired on or after the parameter was first seen on it |
missing_days | Final fired days on which the parameter was absent from the event |
first_missing_date / last_missing_date | First and last absent day |
occurrence_count | Occurrences over the evaluated days |
junk_occurrence_count | Junk-placeholder occurrences over the evaluated days |
junk_value_rate | junk_occurrence_count / occurrence_count |
unexpected_occurrence_count | Occurrences breaking an expected-values rule over the evaluated days; NULL when no rule covers the parameter on this event |
unexpected_value_rate | unexpected_occurrence_count / occurrences on the days the rule was checked |
lost_occurrence_count | Occurrences the configured type(s) could not store |
type_loss_by_configured_type | Lost occurrences per configured type |
type_occurrence_counts | Occurrences per observed data type |
observation_start_date / observation_end_date | First and latest evaluated day of the property |
evaluated_days | Number of evaluated days of the property |
evaluated_days_with_param | Evaluated 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).
| Column | Description |
|---|---|
property_id | Identifier of the GA4 property |
property_name | Display name of the GA4 property; NULL for config_outdated rows |
param_name | Name of the parameter; for config_outdated rows the config key (e.g. pii_detection.enabled) |
param_source | Source array of the parameter; config for config_outdated rows |
event_name | Event the issue was detected on; (all) for parameter-level issues (pii, config_outdated) |
issue_type | pii, type_mismatch, junk_values, unexpected_values, missing_days, type_difference, multiple_data_types or config_outdated |
issue_severity | critical, warning or info |
first_detected_date | First day the issue was detected within the evaluated window |
last_detected_date | Last day the issue was detected |
days_detected | Number of days the issue was detected |
consecutive_days | Length of the run of consecutive detection days that ends on last_detected_date |
is_active | Whether last_detected_date is within issues.active_within_days of the latest evaluated day |
resolved_date | Day after last_detected_date once the issue is no longer active; NULL while active |
is_suppressed | Whether an active suppression covers this issue |
suppression_reason | Reason of the matching suppression(s) |
evidence_numerator | Junk occurrences, unexpected occurrences, lost occurrences, absent final days or days with PII, depending on the issue type |
evidence_denominator | Occurrences, final fired days or evaluated days, depending on the issue type |
evidence_threshold | Configured 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 |
description | Human-readable description with counts and the suggested fix |
pii_types_detected | Comma-separated PII types, for pii issues |
pii_detection_reason | Why PII was flagged, for pii issues |
sample_value | Most 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_date | First evaluated day of the property |
observation_end_date | Latest evaluated day of the property |
evaluated_days | Number 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.
| Column | Description |
|---|---|
property_id | Identifier of the GA4 property |
property_name | Display name of the GA4 property |
event_date | Day the event fired |
param_name | Name of the parameter |
param_source | Source array of the parameter |
param_category | standard, custom or discovered, from its latest daily row |
event_name | Event the parameter is evaluated on |
first_seen_on_event_date | First day the parameter was seen on this event; rows start here |
is_present | Whether the parameter was present on this event on this day |
event_count | Occurrences of the parameter on this event on this day; 0 when absent |
host_event_count | Number of times the event fired on this day |
host_item_count | Number of items across the event's occurrences on this day |
host_eligible_item_count | Number of items with an item_id or item_name on this day |
event_param_coverage_rate | event_count / host_event_count for event parameters and user properties |
item_coverage_rate | Item coverage for item parameters (standard item fields: of items with an id or name) |
occurrence_count | Occurrences on this day; 0 when absent |
junk_occurrence_count | Junk-placeholder occurrences on this day; 0 when absent |
junk_value_rate | junk_occurrence_count / occurrence_count; NULL when absent |
unexpected_occurrence_count | Occurrences breaking an expected-values rule on this day; NULL when no rule covers the parameter on this event, or when absent |
unexpected_value_rate | unexpected_occurrence_count / occurrence_count; NULL when not checked or absent |
lost_occurrence_count | Occurrences the configured type(s) cannot store; 0 when absent |
has_pii_detected | Whether potential PII was detected for the parameter on this day |
issue_types | Raw issue types of the daily row; not suppression-aware |
is_final | Whether 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.
| Column | Description |
|---|---|
test_value | The sample value being tested |
pattern_name | Name of the PII pattern (e.g., email, credit_card) |
pattern_enabled | Whether this pattern is currently enabled in config |
regex_matches | Whether the regex pattern matched the test value |
additional_sql_passes | Whether the additional SQL validation passed (if configured) |
is_detected | Final 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, orCUSTOM_ITEM_PARAMS_ARRAY - Use
ga4_parameter_detection_config_suggestionsview for ready-to-copy configuration code - Add to
exclude_paramslist 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.
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:
- New columns are added automatically. On the first incremental run after the update,
report_dailygets the 12 new columns in oneALTER TABLE. Existing rows are kept, with NULL in the new columns. - Fill history by reprocessing. Rows built before v2.2.17 have no issue, coverage, junk or type-loss data, so
aggregatedandissuesonly evaluate days built with the new version. To fill a past range, reprocess it withREPROCESS_START_DATEandREPROCESS_END_DATEand the tagmodule_ga4_parameter_detection. Prefer reprocessing over a full rebuild: a full rebuild only covers themax_lookback_days/start_daterange. - PII detection stays as you set it. New installs have PII detection on. Older custom configs contain
enabled: falseunderpii_detection, which still wins. Delete that line to use the new default, or keep it to stay opted out. Until then, theissuestable shows aconfig_outdatedrow forpii_detection.enabled. - 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 likeis_mobile. Theissuestable names them in aconfig_outdatedrow - delete those lines. - Legacy columns are deprecated.
has_potential_issueandissue_description(andmissing_datesinaggregated) keep their previous logic so existing dashboards do not change. Move toparam_status,issue_typesand theissuestable.
Some values change meaning or order with this version:
aggregated.unique_values_countis now an approximate distinct count instead of the number of stored samples.aggregated.sample_valuesis ordered by occurrences instead of alphabetically.aggregated.days_with_pii_detectedcounts days, so numbers can be smaller.aggregatednow 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​
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​
- Implementation Audits: Verify GA4 setup completeness and accuracy
- Data Quality Monitoring: Identify and resolve configuration issues
- Discovery Analysis: Find valuable parameters not yet configured
- Migration Validation: Ensure parameter parity when migrating setups
- Compliance Tracking: Monitor parameter usage for privacy compliance
- Performance Optimization: Identify unused parameters for cleanup