Skip to content

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/attributeTypeNotes
apiKeystringYour API key, required for authentication. Required.
IDintMessage ID. Required as a part of address (not GET parameter). See example below.
startDatedateStart date. Optional. Both parameters (startDate, endDate) are required to specify statistics range. Otherwise they are ignored. YYYY-MM-DD format.
endDatedateSee 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/attributeTypeNotes
LinkStatisticsarray[complex]Array of LinkStatistic elements.

SplitTestStatistic element children:

Element/attributeTypeNotes
VersionIdintID of split test version.
VersionNamestringSplit test version name (message subject).
VersionTypestringSplit test version type. Can be either “TestGroup” or “Winner”.
VersionSentDatedatetimeSplit test version sending date.
SentintNumber of sent emails.
BouncedintNumber of bounced emails.
DeliveredintNumber of delivered (sent – bounced) emails.
OpensintNumber of opened emails.
UniqueOpensintNumber of opened emails by unique subscribers.
ClicksintNumber of link clicks.
UniqueClicksintNumber of link clicks by unique subscribers.
ClickersintNumber of unique subscribers that clicked any link.
ComplaintsintNumber of spam complaints.
UnsubscribesintNumber of “unsubscribe” link clicks.
GoalsintNumber of achieved business goals. 
GoalsValueintValue 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>