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 <a href=“eepurl.com/gKmL” target=“_blank”>VIP Report</a> 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.
1701 1702 1703 |
# File 'lib/mailchimp/api.rb', line 1701 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
1699 1700 1701 |
# File 'lib/mailchimp/api.rb', line 1699 def master @master end |
Instance Method Details
#abuse(cid, opts = []) ⇒ Hash
Get all email addresses that complained about a given campaign
1717 1718 1719 1720 |
# File 'lib/mailchimp/api.rb', line 1717 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
1727 1728 1729 1730 |
# File 'lib/mailchimp/api.rb', line 1727 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
1742 1743 1744 1745 |
# File 'lib/mailchimp/api.rb', line 1742 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
1759 1760 1761 1762 |
# File 'lib/mailchimp/api.rb', line 1759 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
1777 1778 1779 1780 |
# File 'lib/mailchimp/api.rb', line 1777 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.
1806 1807 1808 1809 |
# File 'lib/mailchimp/api.rb', line 1806 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.
1952 1953 1954 1955 |
# File 'lib/mailchimp/api.rb', line 1952 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()
1837 1838 1839 1840 |
# File 'lib/mailchimp/api.rb', line 1837 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
1870 1871 1872 1873 |
# File 'lib/mailchimp/api.rb', line 1870 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.
1967 1968 1969 1970 |
# File 'lib/mailchimp/api.rb', line 1967 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.
1988 1989 1990 1991 |
# File 'lib/mailchimp/api.rb', line 1988 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 <a href=“apidocs.mailchimp.com/export/1.0/campaignsubscriberactivity.func.php” targret=“_new”>campaignSubscriberActivity Export API method</a>, <strong>not</strong> this, especially for large campaigns.
1901 1902 1903 1904 |
# File 'lib/mailchimp/api.rb', line 1901 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
1914 1915 1916 1917 |
# File 'lib/mailchimp/api.rb', line 1914 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
1931 1932 1933 1934 |
# File 'lib/mailchimp/api.rb', line 1931 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
2006 2007 2008 2009 |
# File 'lib/mailchimp/api.rb', line 2006 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 <a href=“eepurl.com/gKmL” target=“_blank”>VIP Report</a> 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)
2022 2023 2024 2025 |
# File 'lib/mailchimp/api.rb', line 2022 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.)
2082 2083 2084 2085 |
# File 'lib/mailchimp/api.rb', line 2082 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
2098 2099 2100 2101 |
# File 'lib/mailchimp/api.rb', line 2098 def unsubscribes(cid, opts=[]) _params = {:cid => cid, :opts => opts} return @master.call 'reports/unsubscribes', _params end |