NATS4 API Get Affiliate Hit Data
From TMM Wiki
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
NATS4 supports an API function to get affiliate hit data for a specific time frame. You can choose a specific site or receive the hit data back for all of the sites.
get_affiliate_hit_data accepts the following parameters:
- loginid - The affiliate ID. This parameter is required.
- siteid - The siteid you wish to grab hit data for. If not supplied, NATS will grab hit data for all sites.
- startDate - The beginning date for the data you wish to see. Date will be parsed by the PHP strtotime function. A valid date can be YYYY-MM-DD.
- endDate - The ending date for the data you wish to see. Date will be parsed by the PHP strtotime function. A valid date can be YYYY-MM-DD.
NuSOAP Example
This example continues from the main article NuSOAP Example):
$params = Array( 'loginid' => '2', 'siteid' => 3, 'startDate' => '2012-10-10', 'endDate' => '2012-10-31', ); $result = $client->call('get_affiliate_hit_data', $params, 'natsapiadmin_wsdl'); print_r($result);
Hit Data Output
The output provides the following types of hit data: Raw Hits, Unique Hits, Qualified Hits, Join Hits, Join Submits.
Array ( [raw] => 427 [unique] => 229 [qualified] => 2 [join_hits] => 698 [join_submits] => 271 )