Profile Script for IP range

Avatar

Avatar

melissae6854041

Avatar

melissae6854041

melissae6854041

06-05-2016

Hello, 

We are creating an experience where our success metric is time on site.  We have content authors who spend a lot of time on the site reviewing articles and making edits.  We would like to block our content authors from being included into the campaign so the results are not screwed.  My thought was to create a profile script to determine IP address.  We would then use this script to create an audience that targets everyone but those ranges  Could someone please comment on how to set this up?  

Thanks for any assistance.

View Entire Topic

Avatar

Avatar

nickh86417692

Avatar

nickh86417692

nickh86417692

18-04-2019

Multiple full IPs would be
var res = /^(192.236.17.44)$|^(192.236.17.45)$|
^(192.236.17.46)$/.test(strIp);

If you just want to match "starts with" you can drop the "$" at the end

var res = /^(192.236)|^(192.237)|^(192.238)$/.test(strIp);