Description
Insetting up a call in php I have noticed that the ip address is always the ISP address not the ip address of the browser. How can pass the ip address to the tracker. I thought the call to $_SERVER['REMOTE_ADDR'] would get the correct address.
Example
$config = [
'instance_url' => 'https://owa.mysite.com/',
'cookie_domain' => 'www.mysite.com',
'credentials' => [
'api_key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXx',
'auth_key' => 'XXXXXXXXXXXXXXXxxxxx'
]
];
$sdk = new OwaSdk\sdk( $config );
$tracker = $sdk->createTracker();
$tracker->setSiteId('XXXXXXXXXXXXXXXXXX');
$pageTitle = isset($title) ? $title : 'My Site' ;
$tracker->setPageTitle($pageTitle);
// where can we pass the ip address of the client, not the ISP?
$tracker->trackPageView();
Description
Insetting up a call in php I have noticed that the ip address is always the ISP address not the ip address of the browser. How can pass the ip address to the tracker. I thought the call to $_SERVER['REMOTE_ADDR'] would get the correct address.
Example
$config = [
'instance_url' => 'https://owa.mysite.com/',
'cookie_domain' => 'www.mysite.com',
'credentials' => [
'api_key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXx',
'auth_key' => 'XXXXXXXXXXXXXXXxxxxx'
]
];
$sdk = new OwaSdk\sdk( $config );
$tracker = $sdk->createTracker();
$tracker->setSiteId('XXXXXXXXXXXXXXXXXX');
$pageTitle = isset($title) ? $title : 'My Site' ;
$tracker->setPageTitle($pageTitle);
// where can we pass the ip address of the client, not the ISP?
$tracker->trackPageView();