You need to understand what the user wants. For example, if he logged into the site through google at the request of a “motorcycle” or on the site looking for a motorcycle or simply went to the motorcycle section and there are tractors, bicycles, cars and motorcycles on the site, then the “Perhaps you are interested” widget should slip according to some logic, a couple of motorcycles, a menu (which, let's say, standardly displays "AUTO, TRACTOR, CONDUCTED, MOTO") will have to bring MOTO in the first place. In general, I hope the idea is clear. The site must know the user in person.

In addition, if the user enters the site in a month under another browser, perhaps even from another OS, the site should recognize it.

Actually questions:

  1. How to know the user?
    If you write to a cookie, then when you change the browser, the desired model will not work. If you remember IP, then they seem to be non-permanent. I understand that if it is possible to realize 100% recognition, it is difficult. What is your option would be the golden mean?

  2. If the user came from a search engine (bing, google, yandex, mail, ask, rambler), how can I track it and retrieve the request text?

UPD : I forgot to note that all this should work without registration.

    3 answers 3

    1. How to know the user?

      With your conditions - only through face recognition from a webcam, honestly.

    2. If the user came from a search engine

      If the browser allows you to view information about the previous page (referrer), then through $_SERVER['HTTP_REFERER']; If it does not allow - in any way, most often. Sometimes, however, the counters on the site recognize their own system by cookie, but they are unlikely to share their data with the site.

    How else to know the user? Registration is not accidentally invented. Probably for some reason she needed. By the way, it can be through OPENID or through social networks, then there is no need to go through a separate registration procedure.

    UPD:

    No registration, no analogue of open ID, no hope for cookies and browser info ... Only via webcam. See point 1.

    UPD2: But so you’re probably too lazy (and everyone is lazy): you can memorize the movement of the mouse for each hit: the trajectory, the accuracy of the clicks that highlighted ... Something like a heat map, but much more perfect. Then analyze these movements: it is believed that for the same person there is a typical set of familiar gestures, there is a familiar place on the button where he clicks, there is a standard time for clicks and a standard speed / acceleration for the mouse. Eternal memory server ...

    • 2
      I really liked the idea that each person behaves differently on the site))) maybe in the future and a self-learning system will be created that will identify users. At the moment such experiments can only afford very large projects, in particular, the social network FB && VK - Vitalii Maslianok
    • OK. If you choose between ip, cookie and registration, what would you choose? You can keep ip and cookie in case Ip is variable. Now I will describe the algorithm of mines in 5. rate. - Vitaly Kustov
    • 2
      registration, definitely. Just do not have a sheet of 54 questions, but a field for entering an email or login: after entering, it will either be sent or a login will be shown. Cookies are used exclusively so that the user does not have to log in every time: makes life easier. - knes
    • The user is now lazy. And there are those who do not have enough brains through the same ulogin to register. There is a business in 2 clicks = \ In general I will do as you said. login / registration + eternal cookie - Vitaly Kustov
    • 2
      And I don’t like to go to sites with registration, and if there is also an advertisement ... - avp

    Where the visitor came from - obviously you need to find out from the Referer field. But to track a visitor without registering ... Of course you can, there are all sorts of EverCookie, there are KISSmetrics , etc. Do you really need it?

    • really need to. - Vitaly Kustov

    What you requested is called a web visitor. It tracks user actions, if there is a JS. https://metrika.yandex.ru/promo/webvisor