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/attribute | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
startDate | date | Start date. Optional. If not specified, business unit creation date will be taken. YYYY-MM-DD format. |
endDate | date | End date. Optional. If not specified, current date will be taken. YYYY-MM-DD format. |
scope | string | Filtering 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***** |
scopeValue | string | Filtering 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***** |
scope2 | string | Second filtering scope – works just like „scope”. |
scopeValue2 | string | Filtering scope value for „scope2”. |
grouping | string | Results 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/attribute | Type | Notes |
---|---|---|
SubscriberStatistics | array[complex] | Array of SubscriberStatistic elements. |
SubscriberStatistic element children:
Element/attribute | Type | Notes |
---|---|---|
IsSummaryRow | boolean | If set to true, marks the summary row of statistic table (values are sums of all other rows).* |
Date | date | Date. Returned only if grouping by dates was requested. |
Month | string | Month represented as date period. Returned only if grouping by months was requested. Example: 2010-01-01 : 2010-01-31 |
ListId | int | Subscriber list ID. Returned only if grouping by lists was requested. |
ListName | string | Subscriber list name. Returned only if grouping by lists was requested. |
SegmentId | int | Subscriber segment ID. Returned only if grouping by segments was requested and the row does not contain data about unsegmented subscribers. |
SegmentName | string | Subscriber segment name. Returned only if grouping by segments as requested. If row contains data about unsegmented subscribers, it will return dash („-„) as value. |
Ip | string | Channel IP address. Returned only if grouping by IPs was requested. |
Domain | string | Domain name. Returned only if grouping by domains was requested. |
DomainFamily | string | Domain family name. Returned only if grouping by domain families was requested. |
Vendor | string | Vendor name. Returned only if grouping by vendors was requested. If row contains data about subscribers with no vendor, dash („-„) will be returned. |
SendTimeOptimization | string | Send time optimization. Returned only if grouping by send time optimization was requested. One of: „OptimizationNotUsed”, „TimeOptimized”, „TimeNotOptimized” or dash „-” if does not apply. |
TimeTravelOptimization | string | Time travel optimization. Returned only if grouping by time travel optimization was requested. One of: „OptimizationNotUsed”, „TimeOptimized”, „TimeNotOptimized” or dash „-” if does not apply. |
ReadingEnvironment | string | Reading environment. Returned only if grouping by reading environment was requested. One of: „Other”, „Desktop”, „Mobile”, „Webmail”, „NoActivity” or dash „-” if does not apply. |
ListSize | int | Current list size. |
Growth | int | List size increase/decrease. |
Added | int | Overall number of subscribers that were added to the list. |
AddedUi | int | Number of subscribers added manually using ExpertSender web panel. |
AddedImport | int | Number of subscribers added using manual or automatic imports. |
AddedApi | int | Number of subscribers added using API. |
AddedWeb | int | Number of subscribers added using webforms. |
Removed | int | Overall number of subscribers removed from the list. |
RemovedOptOut | int | Number of subscribers removed because they clicked unsubscribe link. |
RemovedUser | int | Number of subscribers removed manually using web panel. |
RemovedBounceLimit | int | Number of subscribers removed because they reached the maximum number of bounces. |
RemovedSpam | int | Number of subscribers removed because they sent a spam complaint. |
RemovedUserUnknown | int | Number of subscribers removed because their email address bounced with „User Unknown” status. |
RemovedBlacklist | int | Number of subscribers removed because they were added to blacklist. |
RemovedApi | int | Number 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>