The Tim Hortons mobile app in Canada did this very thing: monitoring your GPS location 24/7, and logging special events when you entered a competitor's store, like Starbucks.
https://www.reuters.com/technology/investigation-finds-tim-h...
https://www.reuters.com/technology/investigation-finds-tim-h...
Let us know when you're in the drive through! Just say yes to this prompt.
[location prompt]
===
I've actually been curious about this for a bit, I need to dig in to some apps to see what they're doing. I've noticed, for example, the Chick-Fil-A app does that prompt, and then continues monitoring your location even after you've gotten your order and aren't near the restaurant anymore.
This almost annoys me more than the original intent. They could at least own their actions instead of treating everyone like a moron.