Grocery stores have been tracking your food purchases since the 1990s at least. That's why they have those shopping cards.
I'm not sure what the server side component is - but I don't believe they would have itemized data. So Apple/Amex know that you go to Whole Foods, but don't know what you're buying. Obviously, credit card companies have always had that data anyways.