Capture IP Address

I wondered if anyone knows if it is possible to capture an IP address of a user or someone completing a web page please.

Thanks in advance.


Hi Sarah, we do this at Croydon, I can try to package it up for you, or we can jump on a call to go through it

here is the code, plus there is a reference to the object where the data is stored

var ip = cs.get_session_ip_address();
var context_record_id = params.record_id;
var context_record = cs.record(context_record_id);

if (ip && ip.length > 0) {
‘:id’: context_record_id,
‘application_ip_address_field’: ip,
} else {
cs.log(‘Could not get IP address’);


That’s great Kevin, Thank you.