Solved

Update user property on App Updated Event

  • 26 January 2021
  • 2 replies
  • 34 views

Hello, is it possible to update user property automatically every “App Updated” event triggered? or maybe the best approach to update all user properties value? Thanks

icon

Best answer by stefania 3 February 2021, 04:54

Oooh I remember this challenge so well from my QuizUp days. 😬

 

To my knowledge there’s isn’t an SDK or post-ingestion support for automatically updating user properties upon event triggers – but you can make it easy(-ish) for yourself to enforce it from your codebase…

 

I recommend writing a wrapper function for the events you want to trigger user properties with, which takes in the event name, event properties and user properties, and then updates user properties then triggers the event.

… then call the wrapper function instead of the .track() method directly, where you want the “App Updated” event to be triggered.

… and hope no one else implements the “App Updated” event with the .track() method directly, hah. 🙈

 


This is actually a really interesting subject both from the data consumer side (analyst, PM) and the data producer side (product engineers implementing analytics events). The timing of the user properties update, relative to the event trigger, matter a lot. Off-by-ones (and various versions of those) are suuuper common in my experience…  💩

So I also recommend having a shared documentation (the notorious tracking plan spreadsheet) where you also document that you want to update the user property along with the “App Updated” event – and particularly note whether the user property update should happen before or after the event trigger. 

View original

2 replies

Oooh I remember this challenge so well from my QuizUp days. 😬

 

To my knowledge there’s isn’t an SDK or post-ingestion support for automatically updating user properties upon event triggers – but you can make it easy(-ish) for yourself to enforce it from your codebase…

 

I recommend writing a wrapper function for the events you want to trigger user properties with, which takes in the event name, event properties and user properties, and then updates user properties then triggers the event.

… then call the wrapper function instead of the .track() method directly, where you want the “App Updated” event to be triggered.

… and hope no one else implements the “App Updated” event with the .track() method directly, hah. 🙈

 


This is actually a really interesting subject both from the data consumer side (analyst, PM) and the data producer side (product engineers implementing analytics events). The timing of the user properties update, relative to the event trigger, matter a lot. Off-by-ones (and various versions of those) are suuuper common in my experience…  💩

So I also recommend having a shared documentation (the notorious tracking plan spreadsheet) where you also document that you want to update the user property along with the “App Updated” event – and particularly note whether the user property update should happen before or after the event trigger. 

Oooh I remember this challenge so well from my QuizUp days. 😬

 

To my knowledge there’s isn’t an SDK or post-ingestion support for automatically updating user properties upon event triggers – but you can make it easy(-ish) for yourself to enforce it from your codebase…

 

I recommend writing a wrapper function for the events you want to trigger user properties with, which takes in the event name, event properties and user properties, and then updates user properties then triggers the event.

… then call the wrapper function instead of the .track() method directly, where you want the “App Updated” event to be triggered.

… and hope no one else implements the “App Updated” event with the .track() method directly, hah. 🙈

 

This is actually a really interesting subject both from the data consumer side (analyst, PM) and the data producer side (product engineers implementing analytics events). The timing of the user properties update, relative to the event trigger, matter a lot. Off-by-ones (and various versions of those) are suuuper common in my experience…  💩

So I also recommend having a shared documentation (the notorious tracking plan spreadsheet) where you also document that you want to update the user property along with the “App Updated” event – and particularly note whether the user property update should happen before or after the event trigger. 

Ahhh i see, so it’s basically not supported by the SDK yet, but we can achieve it by a wrapper like you said.
A little bit complicated but i think i can do it haha.

Thanks for your help.

Reply


Mixpanel