Solved

Will updating user_properties to "(none)" value with HTTP API V2 revert back to not provided?

  • 15 December 2022
  • 3 replies
  • 121 views

Userlevel 2
Badge +1
  • Helpful Hero
  • 9 replies

Hi Amplitude community,

 

I wonder of this use case. Let’s say that I need to know if a user a subscriber and want to put it to user_properties. this is the case A user do::

  1. Mon: user joined
  2. Wed: user subscribed
  3. Sat: user unsubsribed

if let’s say I user HTTP API V2 to update the user properties called `is_subscribe`

  1. I don’t want the user to have any `is_subscribe` so not doing anything
  2. update `is)subscribe` to a string: “yes”
  3. (here is my question) -- I want to revert to the first state

 

So for 3, what value that I have to use for HTTP API V2 ya? I know that the value of non existed properties is (none). With that being said, if I update `is_subscribe` to a string “(none)”, will this be merged to Amplitude value of <non-existent> / <not provided>?

 

Thanks!

icon

Best answer by Saish Redkar 15 December 2022, 19:59

View original

3 replies

Userlevel 7
Badge +10

Hey @Lau

If you don’t set the is_subscribe property value explicitly for scenario 3, then Amplitude will carry over the previous stored value of “yes” in subsequent events. So explicitly setting the value to “(none)” will be a good choice for 3.

From what I know, Amplitude combine’s the non existing “(none)” and explicitly set string “(none)” to appear as (none) in the charts.
To validate the difference , you can check the raw event json in any user’s event stream.-

  • the none existing property won’t show up in the raw user properties
  • the explicitly set property should show up as "is_subscribed": "(none)"

Hope this helps.

Userlevel 2
Badge +1

hi @Saish Redkar thanks for the quick reply.

 

This part answer the question! The non existing (none) merged with string “(none)”. But yeah, will check on this. The other part is also a good context for what happen. But anyway thanks!

From what I know, Amplitude combine’s the non existing “(none)” and explicitly set string “(none)” to appear as (none) in the charts.
To validate the difference , you can check the raw event json in any user’s event stream.-

  • the none existing property won’t show up in the raw user properties
  • the explicitly set property should show up as "is_subscribed": "(none)"
Userlevel 2
Badge +1

Just want to update, I checked the data and firing string of “(none)” will merged with Amplitude “not given” data. Just as @Saish Redkar answer.

Reply