There are plenty of companies that track your every movement online. It is not illegal. How do you think targeted advertising works?
Now, displaying those results, I have no clue about the legality of that, but I doubt the government cares about your privacy enough to enact a law that hurts its precious corporate sponsors.