display content based on last search, pages viewing of users

Hi,
When I surf some sites, such as amazon, which would show related content based on my last search or the pages i viewed.
Is there any plugin to achieve this?