Get link statistics
LinkStatistics collection allows retrieving performance statistics for a specified message that are grouped by links such message contains. For every found link numbers of clicks, unique clicks etc. are available.
Request data format
Request URL parameters:
Element/attribute | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
ID | int | Message ID. Required as a part of address (not GET parameter). See example below. |
startDate | date | Start date. Optional. Both parameters (startDate, endDate) are required to specify statistics range. Otherwise they are ignored. YYYY-MM-DD format. |
endDate | date | See startDate. |
Examples:
https://api.esv2.com/v2/Api/LinkStatistics/123?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/LinkStatistics/123?apiKey=YOUR_API_KEY_HERE&startDate=2010-05-20&endDate=2010-05-22
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
LinkStatistics | array[complex] | Array of LinkStatistic elements. |
SplitTestStatistic element children:
Element/attribute | Type | Notes |
---|---|---|
VersionId | int | ID of split test version. |
VersionName | string | Split test version name (message subject). |
VersionType | string | Split test version type. Can be either “TestGroup” or “Winner”. |
VersionSentDate | datetime | Split test version sending date. |
Sent | int | Number of sent emails. |
Bounced | int | Number of bounced emails. |
Delivered | int | Number of delivered (sent – bounced) emails. |
Opens | int | Number of opened emails. |
UniqueOpens | int | Number of opened emails by unique subscribers. |
Clicks | int | Number of link clicks. |
UniqueClicks | int | Number of link clicks by unique subscribers. |
Clickers | int | Number of unique subscribers that clicked any link. |
Complaints | int | Number of spam complaints. |
Unsubscribes | int | Number of “unsubscribe” link clicks. |
Goals | int | Number of achieved business goals. |
GoalsValue | int | Value of achieved business goals. |
Examples
Request:
GET https://api.esv2.com/v2/Api/SplitTestStatistics?apiKey=test_api_key1&id=123443 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=52936639-f1a2-4537-acba-c405471a1203; path=/
X-Powered-By: ASP.NET
Date: Thu, 26 Nov 2015 14:22:15 GMT
Content-Length: 1954
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<SplitTestStatistics>
<SplitTestStatistic>
<VersionId>17567</VersionId>
<VersionName>version 1</VersionName>
<VersionType>TestGroup</VersionType>
<VersionSentDate>2015-10-29T11:00:00</VersionSentDate>
<Sent>54</Sent>
<Bounced>0</Bounced>
<Delivered>54</Delivered>
<Opens>15</Opens>
<UniqueOpens>15</UniqueOpens>
<Clicks>0</Clicks>
<UniqueClicks>0</UniqueClicks>
<Clickers>0</Clickers>
<Complaints>0</Complaints>
<Unsubscribes>0</Unsubscribes>
<Goals>0</Goals>
<GoalsValue>0</GoalsValue>
</SplitTestStatistic>
<SplitTestStatistic>
<VersionId>17568</VersionId>
<VersionName>version 2</VersionName>
<VersionType>TestGroup</VersionType>
<VersionSentDate>2015-10-29T11:00:00</VersionSentDate>
<Sent>53</Sent>
<Bounced>0</Bounced>
<Delivered>53</Delivered>
<Opens>11</Opens>
<UniqueOpens>11</UniqueOpens>
<Clicks>0</Clicks>
<UniqueClicks>0</UniqueClicks>
<Clickers>0</Clickers>
<Complaints>0</Complaints>
<Unsubscribes>0</Unsubscribes>
<Goals>0</Goals>
<GoalsValue>0</GoalsValue>
</SplitTestStatistic>
<SplitTestStatistic>
<VersionId>17569</VersionId>
<VersionName>version 1</VersionName>
<VersionType>Winner</VersionType>
<VersionSentDate>2015-10-29T17:00:00</VersionSentDate>
<Sent>320</Sent>
<Bounced>0</Bounced>
<Delivered>320</Delivered>
<Opens>127</Opens>
<UniqueOpens>127</UniqueOpens>
<Clicks>0</Clicks>
<UniqueClicks>0</UniqueClicks>
<Clickers>0</Clickers>
<Complaints>0</Complaints>
<Unsubscribes>0</Unsubscribes>
<Goals>0</Goals>
<GoalsValue>0</GoalsValue>
</SplitTestStatistic>
</SplitTestStatistics>
</Data>
</ApiResponse>