Skip to content
    Back to Tips & Tricks
    Data Integrity24

    GA4 Parameter Sprawl: One Value, Many Keys

    Written by Viktor KvantSenior Web AnalystApril 23, 20262 min read

    When item_id, itemId and product_id hold the same value, every query needs a COALESCE. A data contract and one dbt staging model fix it.

    GA4 lets any event carry custom parameters, which is a large part of its analytical power. Without governance, the same flexibility produces sprawl in BigQuery: one data point recorded under several keys, such as item_id, itemid, itemId and product_id, sometimes within a single event type. Keys are compared as case-sensitive strings, so each variant is a separate entry in event_params.

    The consequences go well beyond a few extra CASE WHEN statements. Every query has to enumerate every variant, and any analyst who misses one gets silent gaps. Queries grow longer, slower and more error-prone, and trust in the data erodes. A simple analysis of add-to-cart performance by product can turn into a multi-day engineering task just to obtain a consistent product identifier. When raw data is this costly to prepare, deeper questions simply stop being asked.

    Sprawl also breaks experiments. If the variant of a feature is stored in feature_name on some events, in item_id on others and in a generic event_label elsewhere, treatment and control groups cannot be defined reliably, and a difference-in-differences or CausalImpact analysis inherits the error.

    The fix starts upstream, with a data contract that is actually enforced. Before an event is collected, each parameter should be defined by name, data type and expected values. dbt then enforces the contract in the warehouse: a stg_ga4__events model coalesces the known variants into one canonical column, such as product_id, and tests flag any key that is not in the contract. Raw, inconsistent data becomes a dependable base for analysis, and later clean-up shrinks accordingly.

    Collection-side tooling helps further. Robin Signals provides a structured way to define event parameters and check them against a data layer specification before data is sent, which stops sprawl at its origin and keeps the BigQuery side simpler.

    The flexibility of GA4 tracking is not a substitute for a tracking plan. Consistent parameter keys give faster answers, more dependable reporting and a sound base for models ranging from attribution to causal inference.

    Author

    Viktor Kvant

    Senior Web Analyst specialising in data ownership, advanced tracking implementations, and translating data into strategic business value.

    Connect on LinkedIn