Solved

% of users who spent at least X minutes doing something within Y days of another event

  • 10 March 2023
  • 8 replies
  • 176 views

Badge

We are using the free version of Amplitude. In order to determine the popularity of a particular type of content within our app, we want to track the following use-case:

User performs Event A
After performing Event A, user spends at least X minutes consuming that type of content within Y days from the date they performed Event A.

My understanding (please correct me if I am mistaken) is that Amplitude doesn’t have an in-built way of calculating how much time users have spent consuming content. So we plan to have a numeric event property named timespent and our app will track how many minutes each user has spent consuming content from each of the different types of content our app offers, and will include the constantly updated value of that property when we report events to Amplitude.

However, even after doing this, it’s not clear to me how I can use Amplitude to track the use-case described above. This is because in the Funnel chart, while we can segment users whose timespent property value is >= X, this will presumably also include users who spent >= X minutes after Y days of performing Event A. However, we only want to know how many users spent >= X minutes consuming that content type within Y days of performing Event A.

Can someone please advise how we can track this use case?

Thank you.

icon

Best answer by belinda.chiu 21 March 2023, 18:18

View original

8 replies

Userlevel 6
Badge +9

Thanks for reaching out here @roys123. This post from your peers might help as you figure out the next steps here. Our overview of the user sessions chart is also a great place to start. Please keep us posted if you need more help and make progress. 

 

Badge

@Amplitude Admin Thanks for your response, however it doesn’t really answer my question.

 

  1. I had already reviewed the post that you pointed me to regarding tracking the total time spent by a user and as I stated in my post, I know that we will need to measure and send the timespent property to Amplitude ourselves.
  2. I’ve read through everything mentioned in the user sessions chart link that you provided but it didn’t provide an answer to my question. As stated, my question is: “This is because in the Funnel chart, while we can segment users whose timespent property value is >= X, this will presumably also include users who spent >= X minutes after Y days of performing Event A. However, we only want to know how many users spent >= X minutes consuming that content type within Y days of performing Event A.”

So the key question that remains unanswered is how to measure how many users spent >= X minutes doing something in our app within Y days of having performed another event.

Badge

@belinda.chiu Do you have any suggestions regarding this?

Userlevel 6
Badge +8

Hi @roys123 ! Welcome to the Amplitude Community and happy to help! 👋

Love to see that existing Community posts have helped with part of your solution! Your plan to instrument a property that will increment over time is definitely on the right track. My only suggestion is perhaps instrumenting this as a user property so that you can potentially utilize this property on non-content events too. If you do change this to a user property, I highly recommend reading this section in our HC to better understand how user properties apply to events: https://help.amplitude.com/hc/en-us/articles/115002380567#applying-user-properties-to-events 

Interesting use case that you have and you are right in that if you segment users in the right User module with the property, you could be getting users who spent >= X minutes after Y days of performing Event A as Funnel user segments only apply to the first event. 

But I think if you apply that condition to the 2nd event, you should get how many users spent >= X minutes doing something in our app within Y days of having performed another event. See this chart for example: https://analytics.amplitude.com/demo/chart/new/p590wv3 Pretending communities_joined is number of total minutes consuming content, this chart should tell us that 61 users spent 10 or more minutes within 7 days of doing User Sign Up. Assuming that you are incrementing the property correctly, this kind of chart set-up should fit your needs. 

Let me know your thoughts! 

(Side note: I think as a Starter/free customer, you might only be able to segment by user properties for the special Any Event on a chart. As such, I recommend my suggestion to instrument the property as a user property)

Badge

Hi @belinda.chiu Thanks so much for your response - super-appreciated. I think this may be what we are looking for; however, I want to make sure I understand something first:

Let’s say a user consumed a total of 9 minutes of Communities_Joined (which, as you recommended, would be a user property in our instrumentation) on or before 7 days and consumed the 10th minute on the 8th day and then stopped using our app altogether. Are you saying that this user would not show up as one of the users who spent 10 or more minutes in the chart? If that’s the case, then that’s perfect because that’s exactly what we are looking for.

I had initially assumed that the system would be looking at the current value of the user property (in this case, 10) at the time the chart is being generated and therefore including this user in the chart which is not what we want.

But, based on what your saying, it seems that the system will actually be doing what we want it do - looking at the value the Communities_Joined user property had on the 7th day (in this case, 9) and therefore not including this user in the chart?

Userlevel 6
Badge +8

Hi @roys123 ! You’re very welcome - happy to help :D 

That is correct - if you are looking at this chart that I created, https://analytics.amplitude.com/demo/chart/new/mfrah4t, and you know that Belinda (for example) was a user who performed User Sign Up in the last 30 days and did 10 or more minutes of Communities_Joined but after the 7 day conversion window from User Sign Up event, then you will not see Belinda as a converted user. I do want to clarify that you will see me in the chart since I did the User Sign-up event in the last 30 days. I would just be considered a drop-off user in the 2nd Step. But yes, you will not see me as converted or one of the users who spent 10 or more minutes in the chart.  

Amplitude is an events-based platform so actually this means that we capture properties at the time of the event and therefore when you filter for properties on a chart, the properties will be reflective of what was associated with the event at that time. It will not be looking at the current value of the user property at the time the chart is being generated.  

Great to hear that the system will be doing what you want it to do! Since our system does reflect the state during the time of the event, it is very important your new instrumentation for this user property is set-up so that it’ll apply properly (see previous HC article that I linked) and you don’t run into this issue: https://help.amplitude.com/hc/en-us/articles/360016257391-FAQ-Why-is-this-user-counted-under-none-or-an-unexpected-value-

Hope this helps!

Badge

@belinda.chiu Thanks for the clarification. I have another slightly unrelated question. Regarding what is mentioned in https://help.amplitude.com/hc/en-us/articles/115002380567#applying-user-properties-to-events about sending user properties WITH an event (i.e. point 3), will the updated user property apply to the event that it was sent along with, or will it only apply to future events?

Userlevel 6
Badge +8

@roys123 Great question! If the user property was sent on the event itself then it will apply to the event that it was sent along with and also apply to future events. In the case of the doc, with equals to on

Reply