Method: Mailchimp::Reports#opened

Defined in:
lib/mailchimp/api.rb

#opened(cid, opts = []) ⇒ Array

Retrieve the list of email addresses that opened a given campaign with how many times they opened

Parameters:

  • the campaign id to get opens for (can be gathered using campaigns())

  • (defaults to: [])

    various options for controlling returned data

    • Int

      start optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)

    • Int

      limit optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100

    • String

      sort_field optional the data to sort by - “opened” (order opens occurred, default) or “opens” (total number of opens). Invalid fields will fall back on the default.

    • String

      sort_dir optional the direct - ASC or DESC. defaults to ASC (case insensitive)

Returns:

  • array containing the total records matched and the specific records for this page

    • Int

      total the total number of records matched

    • Array

      data structs for the actual opens data, including:

      - [Hash] member the member record as returned by lists/member-info
      - [Int] opens Total number of times the campaign was opened by this email address
      


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