Class: Mailchimp::Goal
- Inherits:
-
Object
- Object
- Mailchimp::Goal
- Defined in:
- lib/mailchimp/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#events(list_id, email, start = 0, limit = 25) ⇒ Hash
Retrieve goal event data for a particular list member.
-
#initialize(master) ⇒ Goal
constructor
A new instance of Goal.
-
#record_event(list_id, email, campaign_id, event) ⇒ Hash
This allows programmatically trigger goal event collection without the use of front-end code.
Constructor Details
#initialize(master) ⇒ Goal
Returns a new instance of Goal.
2367 2368 2369 |
# File 'lib/mailchimp/api.rb', line 2367 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
2365 2366 2367 |
# File 'lib/mailchimp/api.rb', line 2365 def master @master end |
Instance Method Details
#events(list_id, email, start = 0, limit = 25) ⇒ Hash
Retrieve goal event data for a particular list member. Note: only unique events are returned. If a user triggers a particular event multiple times, you will still only receive one entry for that event.
2384 2385 2386 2387 |
# File 'lib/mailchimp/api.rb', line 2384 def events(list_id, email, start=0, limit=25) _params = {:list_id => list_id, :email => email, :start => start, :limit => limit} return @master.call 'goal/events', _params end |
#record_event(list_id, email, campaign_id, event) ⇒ Hash
This allows programmatically trigger goal event collection without the use of front-end code.
2400 2401 2402 2403 |
# File 'lib/mailchimp/api.rb', line 2400 def record_event(list_id, email, campaign_id, event) _params = {:list_id => list_id, :email => email, :campaign_id => campaign_id, :event => event} return @master.call 'goal/record-event', _params end |