Well, of course it’s illegal if it’s part of illegal activity. The author seems to be applying broad charges of criminality to all software that tracks user behavior. We can argue whether any tracking should be illegal, but not whether it already is.