Class: Mailchimp::Reports
- Inherits:
-
Object
- Object
- Mailchimp::Reports
- Defined in:
- lib/mailchimp/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#abuse(cid, opts = []) ⇒ Hash
Get all email addresses that complained about a given campaign.
-
#advice(cid) ⇒ Array
Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages.
-
#bounce_message(cid, email) ⇒ Hash
Retrieve the most recent full bounce message for a specific email address on the given campaign.
-
#bounce_messages(cid, opts = []) ⇒ Hash
Retrieve the full bounce messages for the given campaign.
-
#click_detail(cid, tid, opts = []) ⇒ Hash
Return the list of email addresses that clicked on a given url, and how many times they clicked.
-
#clicks(cid) ⇒ Hash
The urls tracked and their click counts for a given campaign.
-
#domain_performance(cid) ⇒ Array
Get the top 5 performing email domains for this campaign.
-
#ecomm_orders(cid, opts = []) ⇒ Hash
Retrieve the Ecommerce Orders tracked by campaignEcommOrderAdd().
-
#eepurl(cid) ⇒ Hash
Retrieve the eepurl stats from the web/Twitter mentions for this campaign.
-
#geo_opens(cid) ⇒ Array
Retrieve the countries/regions and number of opens tracked for each.
-
#google_analytics(cid) ⇒ Array
Retrieve the Google Analytics data we've collected for this campaign.
-
#initialize(master) ⇒ Reports
constructor
A new instance of Reports.
-
#member_activity(cid, emails) ⇒ Hash
Given a campaign and email address, return the entire click and open history with timestamps, ordered by time.
-
#not_opened(cid, opts = []) ⇒ Hash
Retrieve the list of email addresses that did not open a given campaign.
-
#opened(cid, opts = []) ⇒ Array
Retrieve the list of email addresses that opened a given campaign with how many times they opened.
-
#sent_to(cid, opts = []) ⇒ Hash
Get email addresses the campaign was sent to.
-
#share(cid, opts = []) ⇒ Hash
Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it.
-
#summary(cid) ⇒ Hash
Retrieve relevant aggregate campaign statistics (opens, bounces, clicks, etc.).
-
#unsubscribes(cid, opts = []) ⇒ Hash
Get all unsubscribed email addresses for a given campaign.
Constructor Details
#initialize(master) ⇒ Reports
Returns a new instance of Reports.
1695 1696 1697 |
# File 'lib/mailchimp/api.rb', line 1695 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
1693 1694 1695 |
# File 'lib/mailchimp/api.rb', line 1693 def master @master end |
Instance Method Details
#abuse(cid, opts = []) ⇒ Hash
Get all email addresses that complained about a given campaign
1711 1712 1713 1714 |
# File 'lib/mailchimp/api.rb', line 1711 def abuse(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/abuse', _params end |
#advice(cid) ⇒ Array
Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages. Note: some messages will contain HTML - clean tags as necessary
1721 1722 1723 1724 |
# File 'lib/mailchimp/api.rb', line 1721 def advice(cid) _params = {:cid => cid} return @master.call 'reports/advice', _params end |
#bounce_message(cid, email) ⇒ Hash
Retrieve the most recent full bounce message for a specific email address on the given campaign. Messages over 30 days old are subject to being removed
1736 1737 1738 1739 |
# File 'lib/mailchimp/api.rb', line 1736 def (cid, email) _params = {:cid => cid, :email => email} return @master.call 'reports/bounce-message', _params end |
#bounce_messages(cid, opts = []) ⇒ Hash
Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts of data depending on how large the campaign was and how much cruft the bounce provider returned. Also, messages over 30 days old are subject to being removed
1753 1754 1755 1756 |
# File 'lib/mailchimp/api.rb', line 1753 def (cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/bounce-messages', _params end |
#click_detail(cid, tid, opts = []) ⇒ Hash
Return the list of email addresses that clicked on a given url, and how many times they clicked
1771 1772 1773 1774 |
# File 'lib/mailchimp/api.rb', line 1771 def click_detail(cid, tid, opts=[]) _params = {:cid => cid, :tid => tid, :opts => opts} return @master.call 'reports/click-detail', _params end |
#clicks(cid) ⇒ Hash
The urls tracked and their click counts for a given campaign.
1800 1801 1802 1803 |
# File 'lib/mailchimp/api.rb', line 1800 def clicks(cid) _params = {:cid => cid} return @master.call 'reports/clicks', _params end |
#domain_performance(cid) ⇒ Array
Get the top 5 performing email domains for this campaign. Users wanting more than 5 should use campaign campaignEmailStatsAIM() or campaignEmailStatsAIMAll() and generate any additional stats they require.
1946 1947 1948 1949 |
# File 'lib/mailchimp/api.rb', line 1946 def domain_performance(cid) _params = {:cid => cid} return @master.call 'reports/domain-performance', _params end |
#ecomm_orders(cid, opts = []) ⇒ Hash
Retrieve the Ecommerce Orders tracked by campaignEcommOrderAdd()
1831 1832 1833 1834 |
# File 'lib/mailchimp/api.rb', line 1831 def ecomm_orders(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/ecomm-orders', _params end |
#eepurl(cid) ⇒ Hash
Retrieve the eepurl stats from the web/Twitter mentions for this campaign
1864 1865 1866 1867 |
# File 'lib/mailchimp/api.rb', line 1864 def eepurl(cid) _params = {:cid => cid} return @master.call 'reports/eepurl', _params end |
#geo_opens(cid) ⇒ Array
Retrieve the countries/regions and number of opens tracked for each. Email address are not returned.
1961 1962 1963 1964 |
# File 'lib/mailchimp/api.rb', line 1961 def geo_opens(cid) _params = {:cid => cid} return @master.call 'reports/geo-opens', _params end |
#google_analytics(cid) ⇒ Array
Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured.
1982 1983 1984 1985 |
# File 'lib/mailchimp/api.rb', line 1982 def google_analytics(cid) _params = {:cid => cid} return @master.call 'reports/google-analytics', _params end |
#member_activity(cid, emails) ⇒ Hash
Given a campaign and email address, return the entire click and open history with timestamps, ordered by time. If you need to dump the full activity for a campaign and/or get incremental results, you should use the campaignSubscriberActivity Export API method, not this, especially for large campaigns.
1895 1896 1897 1898 |
# File 'lib/mailchimp/api.rb', line 1895 def member_activity(cid, emails) _params = {:cid => cid, :emails => emails} return @master.call 'reports/member-activity', _params end |
#not_opened(cid, opts = []) ⇒ Hash
Retrieve the list of email addresses that did not open a given campaign
1908 1909 1910 1911 |
# File 'lib/mailchimp/api.rb', line 1908 def not_opened(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/not-opened', _params end |
#opened(cid, opts = []) ⇒ Array
Retrieve the list of email addresses that opened a given campaign with how many times they opened
1925 1926 1927 1928 |
# File 'lib/mailchimp/api.rb', line 1925 def opened(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/opened', _params end |
#sent_to(cid, opts = []) ⇒ Hash
Get email addresses the campaign was sent to
2000 2001 2002 2003 |
# File 'lib/mailchimp/api.rb', line 2000 def sent_to(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/sent-to', _params end |
#share(cid, opts = []) ⇒ Hash
Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password)
2016 2017 2018 2019 |
# File 'lib/mailchimp/api.rb', line 2016 def share(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/share', _params end |
#summary(cid) ⇒ Hash
Retrieve relevant aggregate campaign statistics (opens, bounces, clicks, etc.)
2076 2077 2078 2079 |
# File 'lib/mailchimp/api.rb', line 2076 def summary(cid) _params = {:cid => cid} return @master.call 'reports/summary', _params end |
#unsubscribes(cid, opts = []) ⇒ Hash
Get all unsubscribed email addresses for a given campaign
2092 2093 2094 2095 |
# File 'lib/mailchimp/api.rb', line 2092 def unsubscribes(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/unsubscribes', _params end |