Query users IP address

Hi,

Is it possible to query the users IP address and make it visible with Teneo Query Language (TQL)?

Hello Okeanos, welcome to the forum!

There’s no built-in function on Teneo you can call to access the user’s IP address.

But if you already have access to it via your website you can send it in as an input parameter and run a simple global script to store it in a global variable that is accessible with Teneo Query Language (TQL).

Attaching a sample code below,

if (engineEnvironment.getParameter('ipAddress')) {
	ipAddressVariable = engineEnvironment.getParameter('ipAddress')
}

You can read more on input parameters here: Store input parameters | Teneo Developers and how to query variables here: Teneo Query Language Syntax Overview | Teneo Developers

Warm regards,
Ramazan