If a shop visitor is anonymous and visits the page e.g. for the first time, then his clicks on products, add to carts etc. is tracked. Every time the visitor clicks or moves from page to page, his profile is updated and his recommendations get updated.
If the user logs in or is already logged in the data is saved in his customer profile