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.
2373 2374 2375 |
# File 'lib/mailchimp/api.rb', line 2373 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
2371 2372 2373 |
# File 'lib/mailchimp/api.rb', line 2371 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.
2390 2391 2392 2393 |
# File 'lib/mailchimp/api.rb', line 2390 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.
2406 2407 2408 2409 |
# File 'lib/mailchimp/api.rb', line 2406 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 |