A lot of time ,users come with a use case where it is required to not allow visitor's with a specific IP to enter an activity in Adobe Target . Hence one of the efficient solution for the same would be to create audiences based on specific IP using profile scripts in Adobe Target.

Hence to  access the IP address of visitor in a  profile script,  it is required to use user.header('x-cluster-client-ip’) in a profile script . Please see the below profile script code: 

var strIp= user.header('x-cluster-client-ip');
 
var res = /^(192.236.17.44)$/.test(strIp);
 
if (res)
{
return "Invalid IP";
}
else
{
return "Valid IP";
}

After all the Set up , You can create an Audience named as "Valid Audience" and add "Visitor Profile" as a rule  and then choose the above created profile script name i.e. "User_Exclude_by_IP" as the refinement and choose condition as "Equals" and value as" Valid IP"

ad

Šis darbs ir licencēts saskaņā ar Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported licenci  Uz portālā Twitter™ un Facebook izvietotajiem ziņojumiem neattiecas Creative Commons sistēmas noteikumi.

Juridisks paziņojums   |   Tiešsaistes konfidencialitātes politika