Count of event between two events

  • 19 October 2020
  • 3 replies


Could you explain how I can build a report to answer for the question:

How many times of event Z was performed between event X and event Y when event Y is logged up to N months/days after event X?

Example from real world: I want to know how many times users do event Z if they cancel their subscription after 2 months after sign up. (So event X is ‘sign up’ and event Y is ‘subscription cancelled’)

Thanks in advance!


3 replies

Userlevel 3
Badge +1

It will be easier if the time of event X and event Y was set as profile property. (eg. signup date and cancellation date)

Then you can create a custom property “Time between X and Y” - a DATEDIF() function.

Then create an insight report with frequency of event Z and break it down by the custom property (or filter on it to study specific value of time between X an Y).


Userlevel 3
Badge +5

Using the real world example, I would set signup and cancelled dates as user profile properties.  Then create a user cohort based on users that have cancelled their subscription in the specified time range.  This should allow you to report on the total number of Z filtered by your created cohort.

Instead of using profile properties, it would be ideal if the signup date could be added as a property to the “subscription cancelled” event.  If this is possible it should make it even easier when using Insights reports.  This would also handle the case where users return, if they subscribe or signup again when they had historically cancelled.  For this case, there would be no need to correct the profile data and you would have the full history of signups and cancelled information.

Userlevel 6
Badge +3

Thanks for chiming in @scottk & @Jaya !