Solved

List of all properties and events

  • 24 September 2018
  • 2 replies
  • 31 views

Userlevel 3
Badge

Hi.
I need to get all properties of Mixpanel project via Custom Query API.
Is there a way to get a list of all the properties of all the events?


icon

Best answer by will 25 September 2018, 18:44

function main() {
return Events({
from_date: '2018-01-01',
to_date:'2018-08-21'
})
.groupBy(["name"], function(accums, events){
let props = []
_.each(events, function(event){
props = _.union(_.keys(event.properties), props)})
_.each(accums, function(accum){
props = _.union(accum, props)
})
return props
})
}


@taliabrown that should do it for you :)


View original

2 replies

Userlevel 2
Badge
function main() {
return Events({
from_date: '2018-01-01',
to_date:'2018-08-21'
})
.groupBy(["name"], function(accums, events){
let props = []
_.each(events, function(event){
props = _.union(_.keys(event.properties), props)})
_.each(accums, function(accum){
props = _.union(accum, props)
})
return props
})
}


@taliabrown that should do it for you :)


Userlevel 3
Badge

This is perfect @will! Thank you!!


Reply