It is necessary for self-made crm to find out from which search request the user came to the site (using javascript or php), as well as other additional information.

watched and tried both here . I understood that with $ _SERVER ['HTTP_REFERER'] it will not work, only the address of the site where I came from. For identifying adwords and direct, you can use utm-tags, but this is only a small part of the traffic ...

Google analytics and Yandex metrics are connected to the site, is it possible to extract this information from them somehow? (in real time).

In general, in what way and what can you learn about the user, to transfer this information to crm.

  • one
    It seems to me that search engines send a search query to the refferer in the url via a redirect. - ilyaplot
  • four
    It seems to me that search engines stopped submitting a search query to the refferer 10 years ago - Ipatyev
  • He is encrypted there - Alex
  • Do you need this request at the time of page generation? - vp_arth
  • No, you can after, I can process or transfer the on the front via ajax - Alex

1 answer 1

Dogs do not transmit search queries for a long time. And with forced https, things get worse. So with local analytics everything is very good. badly. It remains only the "needle" from the PS - their analysts / metrics.