Swedish city surveilling phones

I just found out that in the Swedish city of Borås they are currently surveilling phones that got wifi on to target ads and marketing at people in the city. Is this a uniqe thing or is this common? I've never heard of this before and I thought this would be illegal as hell. There is no  option to opt out except for turning the wifi off, and how many non tech geeks do that? My mother doesn't even know what wifi is let alone how to turn it off.

 

Here is a google translated link: https://translate.google.com/translate?sl=sv&tl=en&js=y&prev=_t&hl=sv&ie=UTF-8&u=https%3A%2F%2Fsverigesradio.se%2Fsida%2Fartikel.aspx%3Fprogramid%3D83%26artikel%3D6075056&edit-text=&act=url

 

Probably common. Don't fool yourself, you are being tracked in any way possible everywhere.