lib/mixpanel/event.rb in mixpanel-4.0.1 vs lib/mixpanel/event.rb in mixpanel-4.0.2
- old
+ new
@@ -17,9 +17,17 @@
def append_track(event, properties={})
append 'track', event, track_properties(properties, false)
end
+ def alias(name, properties={}, options={})
+ track_event '$create_alias', properties.merge(:alias => name), options, TRACK_URL
+ end
+
+ def append_alias(aliased_id)
+ append 'alias', aliased_id
+ end
+
protected
def track_event(event, properties, options, default_url)
default = {:url => default_url, :async => @async, :api_key => @api_key}
url = build_url(event, properties, default.merge(options))