On what terms?
If you're asking how they track people just visiting their site, it's through the computer's IP address. Every computer has a distinct one, and if you do a quick search you can find your own, and also view the location (city) and internet provider for that computer.
If you're asking on terms of people with user accounts, it's (obviously) through their account. Most sites keep a history of what you look at and what you buy so that they can try and provide you with things you may like so that you will buy more.
Now if you're asking how they can track you outside of their site, that would be illegal and online stores are definitely not allowed to do that.
Chat with our AI personalities