Skip to main content

Hi everyone,

We’re having a challenge with some events that in some cases have a null value on a property. We want to send the events to GA4 Cloud. That destination does not accept null values so it will fail the event if we try to send it.

We figured to solve this with a coalesce on the mapping of these properties. Then, if it has null, it would use the fallback value to replace null with a string. It turns out you can not set a static value in the coalesce function on the mapping. It will only allow to select 2 properties in the coalesce function.

We try to avoid using an insert function as that makes the setup way more complex in our opinion.

Are there any ways around this? 

Thanks!

Is there a specific reason that you’re passing properties with `NULL` values?

 

My recommendations, in order:

  1. Do not send properties if they do not have a value.
    • Simplest solve, which prevents the issue entirely.
    • Requires development time to modify event emission.
  2. If a property does not have a value and must be sent, use a known, obvious sentinel value.
    • Helpful if you need to know when a value has been un-set and is not simply unpopulated.
    • Requires development time to modify event emission.
    • Requires coordination to determine a sentinel value.
  3. Create a “Destination Insert Function” to clean the data before sending to the Destination.
    • Best when used on a temporary basis.
    • Requires development time to modify event emission.
    • Can be a stepping stone to #1 or #2.

Hi Gray, thanks for your response! My initial thought when my team was discussing this issue was the same; Why do we send a property if it is empty? Shouldn’t it just be dropped instead of passed on the event?

Unfortunately, it needs or will be on the event regardless, at least for now.

I think your suggestion of passing a sentinel value is a good solution I think!


Reply