IP address audience filter | Community
Skip to main content
Level 3
February 7, 2025
Question

IP address audience filter

  • February 7, 2025
  • 1 reply
  • 560 views

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
February 8, 2025

Hi @rjbu ,

Try below PS, It worked for me -

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