Can shops use payment information when you pay with a debit or credit card to track a customer's buying habits?
In other words can a shopkeeper link different purchases at different times in his shop together if they were done with the same card or payed from the same bank account?
By 'can' I mean both technically and legally. The legal part of course depends on jurisdiction and maybe on the terms of the payment provider, so please include that in your answer where relevant.
I know banks track the payments that are made with a card, I am wondering if shops can do so as well.