class Mixpanel::Event

Overview

A mixpanel tracking event.

event = Mixpanel::Event.new "Signed Up"
event["token"] = "YOUR_TOKEN"
event["Referred By"] = "Friend"

event.to_json # =>
{
  "event":      "Signed Up",
  "properties": {
    "token":       "YOUR_TOKEN",
    "Referred By": "Friend",
  },
}

Defined in:

mixpanel/event.cr

Constructors

Constructor Detail

def self.new(event : String, properties : Properties = Properties.new) #

Initialize an Event and optionally set Properties.


[View source]