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
Best answer by stefania
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.