keolo / mixpanel_client

Ruby interface to the Mixpanel Data API
MIT License
148 stars 72 forks source link

Events named "Notification Opened" & "Notification Opened" return incorrect values #27

Closed AhmedBelal closed 11 years ago

AhmedBelal commented 11 years ago

Example:

config = {api_key: KEY, api_secret: SECRET}
client = Mixpanel::Client.new(config)
client.request('events', { event: ["Notification Sent"], type: "unique", unit: "month", interval: 3 })

=> {"legend_size"=>1,
 "data"=>
  {"series"=>["2013-03-01", "2013-04-01", "2013-05-01"],
   "values"=>
    {"Notification Sent"=>
      {"2013-04-01"=>0, "2013-05-01"=>0, "2013-03-01"=>0}}}}

All other events are returning correct data for me.

keolo commented 11 years ago

Does event: '[Notification Sent]' work?

AhmedBelal commented 11 years ago

No, the type needs to be an array.

AhmedBelal commented 11 years ago

Figured it out. "Notification Sent" and "Notification Opened" appear to be two events used internally by Mixpanel, not sent by my app. I don't know why they're exposed to clients in the dashboard but you cannot access them via the data export api.

keolo commented 11 years ago

Glad you found it. Good to know.