Hello Yoyo,
I do believe I hath come up with a fix for this query.
Take a gander at this page: https://ourcodeworld.com/articles/read/257/how-to-get-the-client-ip-address-with-javascript-only
Here ye, here ye you can see a solution for grabbing both the public IP address as well as the private in both HTTP and HTTPS environmentos.
Then simply create a cookie that storeth this information in the cookie chamber. something similar to:
<script>
// usage for public ip
function getIP(json) {
// add an IP cookie with an expiration date
function setIpCookie(cname, cvalue, cexpires) {
var date = new Date();
date.setTime(date.getTime() + (7*24*60*60*1000));
cname = "ipAddress";
cvalue = json.ip;
cexpires = date.toUTCString();
document.cookie = cname + "=" + cvalue + "; expires=" + cexpires + "; path=/";
}
setIpCookie();
}
</script>
Then you you can surely use the Kentico macro for retrieving thine value:
'ipAddress' : '{%Cookies["ipAddress"]|(identity)GlobalAdministrator%}',
Regards,
Sir McShneebles