You do not have to connect to the WIFI
Sensor based approaches rely on infrastructure to determine the location of customer phones. Bluetooth is sometimes used, but very often it’s wifi based. There’s a key strength of using wifi tracking (or ‘sniffing’) - no particular software needs to be installed on a customer’s phone. If they have a phone with wifi enabled, they can be tracked.
Sometimes just a single sensor is placed at a location of interest. This results in proximity data - how many devices came within range.
https://www.crowdconnected.com/blog/people-counting-customer-tracking-counters-vs-wifi-vs-apps/
While I know this is specific to tracking location at a specific venue, if this venue shares its data, you will be associated.
This is not about apps or permissions. This is your WIFI radio being unique.
Edit: This is not personally identifiable, but every little bit if data is getting analyzed nowadays.