In Finland, at least, the most common way is to get people to download an app, or join a bonus club. I'm sure they use visual analytics too, but identifying store visitors means storing personal data, which you can't do without explicit consent.
Are you talking about the GPDR? In Finland, are you allowed to store personal information? Can you maintain an address book or contact information on your phone? Does the law distinguish between commercial and non-commercial uses of personal information?
It applies to systematic collection and processing of personal data.