Skip to main content
Level 3
Feb 7, 2025 8:19 PM UTC
Question

IP address audience filter

hello all,

 

I'm trying to create an audience rule in Target to filter out users based on IP address.  I've seen it accomplished in the past using a profile script like this:

 

user.header('x-cluster-client-ip')

 

which would fetch the user IP address.  However, I'm not seeing this working in action.  does anyone have advice on how this could be set up ?

1 reply

Gaureshk_Kodag
Adobe Employee
Adobe Employee
Feb 8, 2025 1:10 PM UTC

Hi @rjbu ,

Try below PS, It worked for me -

var visitorIp = user.header('x-forwarded-for');
return visitorIp; 

 



Translate