@anonymous-matomo-user opened this Issue on February 6th 2011

It would be useful to be able to check for specific IP addresses either explicitly or that match a given subnet within the visitor log for some users. I'm not sure if the best route would be via a plugin or within the existing core.

@robocoder commented on April 21st 2011 Contributor

I believe matching a specific IP address is already covered by the segmentation API.

For subnets, one would need to convert the subnet to a range, to use >= and <= in the segment expression. (Can refactor some code in the SitesManager API.)

@anonymous-matomo-user commented on April 22nd 2011

Hey vipsoft. Sounds like you're on top of it. Thanks for considering the idea.

@mattab commented on April 22nd 2011 Member

It already works, you can search for IP in a range by building the range yourself: &segment=visitIp>109.130.187.158,visitIp&lt;109.130.187.160 will match the IP 109.130.187.159

@anonymous-matomo-user commented on April 22nd 2011

Hey Matt. I'm not sure what you mean. Is that available through the GUI?

@mattab commented on April 22nd 2011 Member

Not through the UI, yet, because if we add this, in fact we want to add the full set of filters that are available (http://piwik.org/docs/analytics-api/segmentation/ ) not only the IP. This is covered in: #1839 (first point)

this is possible to filter visitors via the API segmentation feature: http://piwik.org/docs/analytics-api/segmentation/

@anonymous-matomo-user commented on April 22nd 2011

Excellent. Looks like the Segment API is a more comprehensive and flexible approach.

@robocoder commented on April 23rd 2011 Contributor

In [4533], added SitesManager API getIpsForRange($ipRange).

@mattab commented on April 26th 2011 Member

Anthon, visitIp>109.130.187.158,visitIp<109.130.187.160 doesn't work anymore with 1.4-rc2 - probably, the filter applied is not expecting ipv4? Now, when I run this on the demo, the following IP gets returned: &lt;visitIp>114.249.215.0&lt;/visitIp>

@mattab commented on April 26th 2011 Member

btw, I see that after upgrading demo to rc2, the IP 114.249.215.0 is there, but it doesn't look like a correct IP since it ends with .0 ? (IP anonymization not setup on the demo)

@mattab commented on April 26th 2011 Member

sorry my bad, the filter indeed works as expected in RC2!

however the question with the ip ending .0 is still valid

@mattab commented on April 26th 2011 Member

It seems it was a one off occurence, since all recent IPs tracked by demo look good!

This Issue was closed on April 26th 2011
Powered by GitHub Issue Mirror