Menu

Find every custom parameter your GA4 implementation actually sends (a key-inventory query)
πŸ“°

Find every custom parameter your GA4 implementation actually sends (a key-inventory query)

DEV Community: sqlΒ·ι–’θ–ηŸ’Β·about 6 hours ago
#7JqZJ15Y
#devtosql#devto#dev#value#select
Long article (877 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Every GA4 implementation drifts from its documentation. Someone added a parameter for a campaign in March; a developer renamed one in June; the measurement plan says plan_type but the site sends planType . Before you write analysis SQL against custom dimensions, you need the inventory of what actually arrives β€” and BigQuery will just tell you.

The key inventory

event_params is a repeated record of key/value pairs. UNNEST it over a single day and count by key, including which value type each key carries:

SELECT ep . key , COUNT (*) AS occurrences, COUNTIF(ep.value.string_value IS NOT NULL) AS has_string, COUNTIF(ep.value.int_value IS NOT NULL) AS has_int, COUNTIF(ep.value.float_value IS NOT NULL) AS has_float FROM `project.analytics_123456789.events_*`, UNNEST(event_params) AS ep WHERE _TABLE_SUFFIX = '20260115' GROUP BY ep.key ORDER BY occurrences DESC;

Enter fullscreen mode

Exit fullscreen mode

The same for user_properties :

SELECT prop .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.