home > support > API > Marketplace API > channel performance
Channel Performance
| Purpose | List top 50 channels by number of unique visitor clicks (or check performance for a specific channel). For use by Marketplace Partner accounts only, not available to Tour Operator accounts. |
| Notes | n/a |
| REST info |
Call | /p/channels/performance /c/channel/performance |
| Formats | XML |
| Example | /p/channels/performance.xml |
| Verb | GET |
| Code |
PHP examples use the PHP Client Library with SimpleXML
Description
object channel_performance ( [ int $channel = 0 ] )
Parameters
$channel
Use to get the performance stats just for a specific channel
Example
// Optionally set a Channel ID, leave as 0 to return top 50
$channel = 0;
// Query the TourCMS API
$results = $tourcms->channel_performance($channel);
// Loop through each channel
foreach($results->channel as $channel) {
// Print out the channel name
print $channel->channel_name;
// Print out the number of unique visitors
print " (Unique visitors: ".$channel->unique_visitors;
// If we have sufficient permission show the amount of commission
if($channel->connection_permission > 1)
print ", Commission: ".$channel->commission_display;
// Close brackets and create a new line
print ")<br />";
}
Example Tours (Unique visitors: 10, Commission £50.00)
Operator two (Unique visitors: 20)
Another operator name (Unique visitors 30, Commission: US$40.00)
C# examples use the .Net Client Library
Overload list
XmlDocument ChannelPerformance ()
XmlDocument ChannelPerformance (int channelId)
Parameters
channelId
Optional, return stats on a single channel
Example
// Optionally set a Channel ID, leave as 0/blank to return top 50
int channelId = 0;
// Query the TourCMS API
XmlDocument doc = myTourCMS.ChannelPerformance(channelId);
// Display Channel list
XmlNodeList chanList = doc.GetElementsByTagName("channel");
For Each channel As XmlNode In chanList
{
string chanName = channel.SelectSingleNode("channel_name").InnerText;
string uniques = channel.SelectSingleNode("unique_visitors").InnerText;
Console.WriteLine(chanName + "(Unique visitors: " + uniques + ")");
}
Example Tours (Unique visitors: 10)
Operator two (Unique visitors: 20)
Another operator name (Unique visitors 30)
VB examples use the .Net Client Library
Overload list
XmlDocument ChannelPerformance ()
XmlDocument ChannelPerformance (int channelId)
Parameters
channelId
Optional, return stats on a single channel
Example
' Optionally set a Channel ID, leave as 0/blank to return top 50
Dim channelId As Integer = 0
' Query the TourCMS API
Dim doc As XmlDocument = myTourCMS.ChannelPerformance(channelId)
' Display Channel list
Dim chanList As XmlNodeList = doc.GetElementsByTagName("channel")
foreach (XmlNode channel in chanList)
{
Dim chanName As string = channel.SelectSingleNode("channel_name").InnerText
Dim uniques As string = channel.SelectSingleNode("unique_visitors").InnerText
Console.WriteLine(chanName & "(Unique visitors: " & uniques & ")")
}
Example Tours (Unique visitors: 10)
Operator two (Unique visitors: 20)
Another operator name (Unique visitors 30)
|
Querystring parameters
There are no querystring parameters supported by this method.
Response fields
Some fields are only returned if the Channel has granted you permission level 2 or above.
The channel permission level is returned as part of the response. You can also check permissions on your channels via the Your connections section of your control panel or by calling the Show Channel API call.
Response fields
| XML Node | Notes |
| request |
Confirmation of the request that you sent |
| error |
Any error message returned, if there is no error this will just contain the text OK |
| report_start_date |
Start date for the range of dates included in the report |
| report_end_date |
End date for the range of dates included in the report |
channel |
There will be one channel node for channel returned
Each channel node contains the following child nodes.
| XML Node | Notes |
| Returned for all Channels |
| channel_id | Channel ID |
| account_id | Account ID |
| channel_name | Channel name |
| connection_permission | Permission level granted by the Channel owner (1 to 3) view full list. |
| unique_visitors | The number of individual visitors clicking through, e.g. if one visitor clicks several times they will only be counted here once. May be prefaced with a "~" if you are connected to this TourCMS account via multiple channels, used to indicate that we can't say which channel a click went via, just that it came from you to that account |
| Only returned if the Channel has granted permission level 2 or above |
| total_bookings | Total number of bookings associated with you |
| total_customers | Total number of customers associated with you (a booking can contain multiple customers) |
| open_enquiries | Number of open enquiries associated with you |
| closed_enquiries_success | Number of closed enquiries associated with you that were closed as a success (customer query solved or they went on to book) |
| closed_enquiries_failure | Number of closed enquiries associated with you that were closed as a failure (customer query not solved or they did not go on to book) |
| sales_revenue | Amount of revenue generated for the channel by your relationship (e.g. 100.00) |
| sale_currency | Currency for the sale_revenue (e.g. GBP, USD, EUR etc) |
| sales_revenue_display | A nicer display presentation of the sales_revenue including currency symbol where applicable. (e.g. US$100.00) |
| commission | Amount of commission generated to you (e.g. 20.00) |
| commission_tax | Amount of tax on the commission (e.g. 2.75) |
| commission_currency | Currency for the commission amounts (e.g. GBP, USD, EUR etc) |
| commission_display | A nicer display presentation of the commission including currency symbol where applicable. (e.g. US$20.00) |
| commission_tax_display | A nicer display presentation of the commission tax including currency symbol where applicable. (e.g. US$2.75) |
| click2book | Number of clicks required for a booking. May be prefaced with a "~" if you are connected to the account behind the channel via multiple channels, used to indicate that we can't say which channel a click went via, just that it came from you to that account |
| commercial_avclick2book_private | Average number of unique visitors (via tracking script) to deliver 1 booking. This is accross all of their connections (i.e. not just to you) and matches the number available via the Show Channel API method. |
|
More information