Module: Drip::Client::Events
- Included in:
- Drip::Client
- Defined in:
- lib/drip/client/events.rb
Instance Method Summary collapse
-
#track_event(email, action, properties = {}) ⇒ Object
Public: Track an event.
Instance Method Details
#track_event(email, action, properties = {}) ⇒ Object
Public: Track an event.
email - Required. The String email address of the subscriber. action - Required. The String event action. properties - Optional. A Hash of event properties.
Returns a Drip::Response. See www.getdrip.com/docs/rest-api#record_event
14 15 16 17 |
# File 'lib/drip/client/events.rb', line 14 def track_event(email, action, properties = {}) data = { "email" => email, "action" => action, "properties" => properties } post "#{account_id}/events", generate_resource("events", data) end |