- This topic has 2 replies, 2 voices, and was last updated 10 years, 2 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › $clienturl not recorded at API/remote-click-track.php (Tracking Clicks Remotely
Hi,
I have successfully create remote Click Tracking Code using this guide :
The click throughs api data successfully recorded and appear at the Click Througs report on WP-Affiliate Dashboard.
This is the code we used to call the API:
$clientip = $_SERVER;
$clientbrowser=$_SERVER;
$clienturl = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
$remote_url = “http://ourserver.com/wp-content/plugins/wp-affiliate-platform/api/remote-click-track.php”;
$remote_url = $remote_url.’?secret=’.$secretword;
$remote_url = $remote_url.’&ap_id=’.$ap_id;
$remote_url = $remote_url.’&clientip=’.$clientip;
$remote_url = $remote_url.’&clientbrowser=’.$clientbrowser;
$remote_url = $remote_url.’&clienturl=’.rawurlencode($clienturl);
The Affiliate Id, Date, Time and IP Address are successfully recorded,
but the Referal URL (clienturl) are not appear at the Click Throughs Wp Affiliate Dashboard. The Referal URL display as blank.
I have enable the WP Affiliate Debug, and it also display the Referal URL is blank on the log file.
I think this line is not correct :
$remote_url = $remote_url.’&clienturl=’.urlencode($clienturl);
Please help…
Before calling the API, have you tried echoing the content of the $clienturl variable to see if it has any data?
Problem solved.
The clientbrowser also need to encode.
Thank You