Get link statistics
SmsMmsLinkStatistics 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 | SMS/MMS 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/SmsMmsLinkStatistics/123?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/SmsMmsLinkStatistics/123?apiKey=YOUR_API_KEY_HERE&startDate=2017-05-20&endDate=2017-05-22
Response
Response Data element:
Element/attribute | Type | Notes |
---|---|---|
LinkStatistics | array[complex] | Array of LinkStatistic elements. |
SplitTestStatistic element children:
Element/attribute | Type | Notes |
---|---|---|
Url | string | Link URL. |
Title | string | Link title. Optional. |
Clicks | int | Number of link clicks. |
UniqueClicks | int | Number of link clicks by unique subscribers. |
Examples
Request:
GET https://api.esv2.com/v2/Api/SmsMmsLinkStatistics/764?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
OK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=znbbf255rwgtzketrup04q55; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2017 13:05:25 GMT
Content-Length: 286
<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Data>
<LinkStatistics>
<LinkStatistic>
<Url>http://www.msn.com</Url>
<Clicks>5</Clicks>
<UniqueClicks>1</UniqueClicks>
</LinkStatistic>
<LinkStatistic>
<Url>http://www.google.com</Url>
<Title>Google Link</Title>
<Clicks>2</Clicks>
<UniqueClicks>1</UniqueClicks>
</LinkStatistic>
<LinkStatistic>
<Url>http://www.cnn.com</Url>
<Title>CNN</Title>
<Clicks>5</Clicks>
<UniqueClicks>2</UniqueClicks>
</LinkStatistic>
</LinkStatistics>
</Data>
</ApiResponse>