Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunk: segment visitIp lookup #2071

Closed
anonymous-matomo-user opened this issue Feb 6, 2011 · 11 comments
Closed

trunk: segment visitIp lookup #2071

anonymous-matomo-user opened this issue Feb 6, 2011 · 11 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
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
Copy link
Author

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

@mattab
Copy link
Member

mattab commented Apr 22, 2011

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
Copy link
Author

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

@mattab
Copy link
Member

mattab commented Apr 22, 2011

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
Copy link
Author

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

@robocoder
Copy link
Contributor

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

@mattab
Copy link
Member

mattab commented Apr 26, 2011

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
Copy link
Member

mattab commented Apr 26, 2011

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
Copy link
Member

mattab commented Apr 26, 2011

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

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

@mattab
Copy link
Member

mattab commented Apr 26, 2011

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants