Solved

Can you define event properties based on the date?

  • 5 April 2023
  • 6 replies
  • 79 views

Userlevel 1
Badge +1

In particular, I’m looking to define an event property to extract the day of week that the event happens on, similar to DATE_PART in sql. Is this possible? Or really any kind of time parsing as a property: day of week, hour of event, etc. 

icon

Best answer by Brian W 6 April 2023, 20:12

View original

6 replies

Userlevel 2
Badge +1

Hi there,

 

Thanks for reaching out! The time/day of the week an event occurs isn’t a property you can build/define new properties on in the Heap UI, unfortunately. This type of manipulation can only be done downstream via Heap Connect, in SQL as you mentioned. If you can share some more details on your use case and what you’d like to use this property for in analysis, I’d be happy to submit a feature request to our product team for it to be added in future releases!

Userlevel 1
Badge +1

Definitely, I was looking to use it as a group by property to look at average conversion rates between events or average counts of users performing a given event for each time period. Grouping by hour of day or day of week would help us target our marketing efforts, but also it’s just a nice way to spot-check behavior differences between various segments or groups. 

Userlevel 2
Badge +1

Thanks for that context, Brynne! You can actually accomplish those goals without creating any new properties, by using the built-in date range grouping in your charts! Grouping by day or hour like in the screenshots below will section out your data by those timeframes in the results.

 

 

Userlevel 1
Badge +1

Yes but then there’s no way to group over larger periods, i.e. not just “on X day the hourly trend looked like this” but “for all Wednesdays the average hourly trend looks like”. I know you can compare against a previous period as well but was just looking for a longer term aggregate 👍🏻

Userlevel 5
Badge +3

@brynne Maybe check out this doc. I wrote this back in… 2017? and it’s gotten a lot of use since then. 

https://help.heap.io/analysis-examples/retention/see-what-time-of-day-your-customers-are-most-active/

Userlevel 1
Badge +1

@jonathan I did find that article and came to a similar workaround using the CSV exports and python. I think with how much use that article has probably gotten though it just lends more support to the request for it being built-in as a feature 

Reply