The ID provided by the cookie links the specified items to the customer. By associating items with users, users may browse throughout the site without losing any items in their cart. If the customer must leave the site before purchasing the selections, those items remain in the shopping cart which is tagged with the customer's identifier. Cookies are analogous to the claim check you receive when you check your coat. As long as you have your claim ticket, you may retrieve your coat directly after dinner or even some time next week.
Cookies also provide the means to track users.
Servers can log which sites users previously visited. In essence, a user's past, present, and future navigation can be tracked. Advertisers can track how often the user hits a site, how long they remain at that site, which advertisements or links are of interest, and at what point the user loses interest and leaves the site. The data gathered can be used to customize sites. Marketers predict age, sex, and household income based on behavior observed via cookies.