If you've ever tried extracting custom parameters from event_params, you’ve likely run into this confusing situation:
value.string_value, value.int_value, value.double_value...
And you’re left wondering: where’s the good old value that just works?
The issue:
GA4 stores parameter values in a structured format. Each parameter is a structure with several possible types:
• If it’s a string → it goes into string_value
• If it’s an integer → it goes into int_value
• If it’s a float → it might land in double_value
• And sometimes... it’s just missing altogether
So what do you do when you just want to know what button_price a user saw?
Enter COALESCE.
It’s a SQL function that returns the first non-NULL value from the list you give it. Perfect when you’re not sure where GA4 stashed your data.
What this code does:
• Tries to use int_value (if the value was a whole number)
• If that’s NULL, falls back to double_value
• Still NULL? Tries to convert string_value into a number
• If all else fails, returns NULL — but at least it won’t break your query
Things to watch out for:
• Not all strings can be safely turned into numbers — use SAFE_CAST to avoid query failures
• Some parameters might be completely empty
• COALESCE checks values in order — it will stop at the first non-NULL match
Takeaway:
GA4 stores values “just in case” — across all possible types.
BigQuery gives you the tools to figure out where the real value is.
And COALESCE is like a master key for it all — just remember that sometimes, behind the door, there’s nothing at all.
Want to get all my top Linkedin content? I regularly upload it to one Notion doc.
Go here to download it for FREE.


