Solved

Send events, but update a value instead of adding on

  • 22 July 2023
  • 3 replies
  • 106 views

I have a game with auto-generated levels that people can play in parallel.

 

I want to track how many levels are being played at any time. For example

 

5 levels – 10000 users

7 levels – 1000 users

2 levels – 8000 users

15 levels – 500 users etc.

 

Every time a user exists/kills a level, I want them to send an update – user-id 5, 10 levels (earlier 11).

 

How can I achieve this?

 

icon

Best answer by Saish Redkar 27 July 2023, 17:46

View original

3 replies

Userlevel 7
Badge +10

Hi @quintinpar 

If I’m understanding this correctly, then you can update the values of your user properties using the Identify API without sending an event.

Can I do this without using user properties? This has an impact on the privacy nutrition label, GDPR etc.

I need something simple in the way of

 

Send and event. Update that event sometime later in the journey.

Userlevel 7
Badge +10

Can you elaborate further?

Once you ingest an event with a set of properties, it’s not possible to attach context to it in the future.

You can do this on the user level by having 2 properties : current_level and previous_level, and updating them as the user graduates from one level to the next.

The only catch of using the Identify API is that the properties will be applied to the user’s next event. So it’s a tradeoff between updating their level with an explicit event vs just updating their levels and waiting for their next event to make the level change applicable.

Reply