Перейти к содержимому

Get subscriber statistics

SubscriberStatistics collection allows retrieving data about performance of subscriber lists. This means current list size, number of subscribers that subscribed to or unsubscribed from the list in specified time period and so on.

Request data format

Request URL parameters:

Element/attributeTypeNotes
apiKeystringYour API key, required for authentication. Required.
startDatedate Start date. Optional. If not specified, business unit creation date will be taken. YYYY-MM-DD format.
endDatedateEnd date. Optional. If not specified, current date will be taken. YYYY-MM-DD format.
scopestringFiltering scope. Optional. If not specified, no filtering will be applied (data for the whole business unit will be returned).

Available scopes are:
List — only results for specific subscriber list
Domain — only results for specific domain
DomainFamily — only results for specific domain family*
MessageType — only results for specific message type**
Ip — only results for specific IP channel
Segment — only results for specific subscriber segment
Vendor — only results for specific vendor
Tag — only results for messages marked with a tag
SendTimeOptimization — only results for messages with specific sending time optimization settings***
TimeTravelOptimization — only results for messages with specific Time Travel settings****
ReadingEnvironment — only results for messages opened/clicked in specific reading environment*****
scopeValuestringFiltering scope value. Required if scope was specified. This is a mixed value, type depends on selected scope.
List — List ID, int, e.g. 123
Domain — domain name, string, e.g. domain.com
DomainFamily — domain family name, string, e.g. Gmail*
MessageType — message type name, string, e.g. Newsletter**
Ip — IP of channel, string, e.g. 11.22.33.44
Segment — Segment ID, int, e.g. 123
Vendor — vendor name, string, e.g. foobar
Tag — Tag name, e.g. holidays
SendTimeOptimization — only results for messages with specific sending time optimization settings***
TimeTravelOptimization — only results for messages with specific Time Travel settings****
ReadingEnvironment — only results for messages opened/clicked in specific reading environment*****
scope2stringSecond filtering scope — works just like «scope».
scopeValue2stringFiltering scope value for «scope2».
groupingstringResults grouping. Optional. If not specified, results will be grouped by whole business unit (one row of data will be returned with all values summed up).
 
Available groupings are:
Date
Month
List
Segment
Ip
Domain
DomainFamily
Vendor
Tag
SendTimeOptimization
TimeTravelOptimization
ReadingEnvironment

NOTE: It is impossible to filter and group by the same thing. scope parameter value must be different from grouping parameter value

* Domain families are specific to each business unit and may be customized. Typical domain families that usually are used (but do not have to apply to your unit!) are: Yahoo, Outlook.com, Gmail, AOL, Other.
** Available message types: Newsletter, Autoresponder, Trigger, Transactional, Confirmation, Recurring, Test.
*** Possible SendTimeOptimization message settings: OptimizationNotUsed, TimeOptimized, TimeNotOptimized.
**** Possible TimeTravelOptimization message settings: OptimizationNotUsed, TimeOptimized, TimeNotOptimized.
***** Possible ReadingEnvironment values: Other, Desktop, Mobile, Webmail, NoActivity.

Examples:

https://api.esv2.com/v2/Api/SubscriberStatistics?apiKey=YOUR_API_KEY_HERE

https://api.esv2.com/v2/Api/SubscriberStatistics?apiKey=YOUR_API_KEY_HERE&scope=List&scopeValue=1&grouping=Vendor

Response

Response Data element:

Element/attributeTypeNotes
SubscriberStatisticsarray[complex]Array of SubscriberStatistic elements.

SubscriberStatistic element children:

Element/attributeTypeNotes
IsSummaryRowbooleanIf set to true, marks the summary row of statistic table (values are sums of all other rows).*
DatedateDate. Returned only if grouping by dates was requested.
MonthstringMonth represented as date period. Returned only if grouping by months was requested.
Example: 2010-01-01 : 2010-01-31
ListIdintSubscriber list ID. Returned only if grouping by lists was requested.
ListNamestringSubscriber list name. Returned only if grouping by lists was requested.
SegmentIdintSubscriber segment ID. Returned only if grouping by segments was requested and the row does not contain data about unsegmented subscribers.
SegmentNamestringSubscriber segment name. Returned only if grouping by segments as requested. If row contains data about unsegmented subscribers, it will return dash («-«) as value.
IpstringChannel IP address. Returned only if grouping by IPs was requested.
DomainstringDomain name. Returned only if grouping by domains was requested. 
DomainFamilystringDomain family name. Returned only if grouping by domain families was requested.
VendorstringVendor name. Returned only if grouping by vendors was requested. If row contains data about subscribers with no vendor, dash («-«) will be returned.
SendTimeOptimizationstringSend time optimization. Returned only if grouping by send time optimization was requested. One of: «OptimizationNotUsed», «TimeOptimized», «TimeNotOptimized» or dash «-» if does not apply.
TimeTravelOptimizationstringTime travel optimization. Returned only if grouping by time travel optimization was requested. One of: «OptimizationNotUsed», «TimeOptimized», «TimeNotOptimized» or dash «-» if does not apply.
ReadingEnvironmentstringReading environment. Returned only if grouping by reading environment was requested. One of: «Other», «Desktop», «Mobile», «Webmail», «NoActivity» or dash «-» if does not apply.
ListSizeintCurrent list size.
GrowthintList size increase/decrease.
Addedint Overall number of subscribers that were added to the list.
AddedUiintNumber of subscribers added manually using ExpertSender web panel.
AddedImportintNumber of subscribers added using manual or automatic imports.
AddedApiintNumber of subscribers added using API.
AddedWebintNumber of subscribers added using webforms.
RemovedintOverall number of subscribers removed from the list.
RemovedOptOutintNumber of subscribers removed because they clicked unsubscribe link.
RemovedUserintNumber of subscribers removed manually using web panel.
RemovedBounceLimitintNumber of subscribers removed because they reached the maximum number of bounces.
RemovedSpamintNumber of subscribers removed because they sent a spam complaint.
RemovedUserUnknownintNumber of subscribers removed because their email address bounced with «User Unknown» status.
RemovedBlacklistintNumber of subscribers removed because they were added to blacklist.
RemovedApiintNumber of subscribers removed using API.

*Summary rows do not contain grouping columns (e.g. Date, Month).

Examples

Request (ungrouped statistics):

GET https://api.esv2.com/v2/Api/SubscriberStatistics?apiKey=test_api_key1&scope=List&scopeValue=1&scope2=DomainFamily&scopeValue2=Gmail HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

OK response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
Set-Cookie: TEMP_DATA=b8567a11-cbb2-4525-b355-782b8b3ea005; path=/
X-Powered-By: ASP.NET
Date: Wed, 29 Jul 2015 14:44:34 GMT
Content-Length: 870

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
    <SubscriberStatistics>
      <SubscriberStatistic>
        <IsSummaryRow>true</IsSummaryRow>
        <ListSize>469</ListSize>
        <Growth>469</Growth>
        <Added>470</Added>
        <AddedUi>0</AddedUi>
        <AddedImport>437</AddedImport>
        <AddedApi>0</AddedApi>
        <AddedWeb>0</AddedWeb>
        <Removed>1</Removed>
        <RemovedOptOut>1</RemovedOptOut>
        <RemovedUser>0</RemovedUser>
        <RemovedBounceLimit>0</RemovedBounceLimit>
        <RemovedSpam>0</RemovedSpam>
        <RemovedUserUnknown>0</RemovedUserUnknown>
        <RemovedBlacklist>0</RemovedBlacklist>
        <RemovedApi>0</RemovedApi>
      </SubscriberStatistic>
    </SubscriberStatistics>
  </Data>
</ApiResponse>
On this page
To top