I know a group of visitors use a number of IP ranges and I am trying to create a Visitor IP segment based on the ranges. But instead of adding on to each added range, the segment is reducing with each range added.
How do I write it to make the ranges accumulate. So segment visits by IPs between “Range X” OR “Range Y” OR “Range Z”?
hello,
if you need to define a segmentX: IP in rangeA OR rangeB OR rangeC
where:
rangeA --> A1<=visitIp<=A2
rangeB --> B1<=visitIp<=B2
rangeC --> C1<=visitIp<=C2
you can write in a single segment the following conditions:
visitIp>=A1
AND
visitIp<=A2 OR visitIp>=B1
AND
visitIp<=B2 OR visitIp>=C1
AND
visitIp<=C2
only IP in one of the three range will match the 4 condition AND.
An example to match only IP private addresses
&segment=visitIp>=10.0.0.0;visitIp<=10.255.255.255,visitIp>=172.16.0.0;visitIp<=172.31.255.255,visitIp>=192.168.0.0;visitIp<=192.168.255.255