How to change the information on the site if the user has moved from contextual advertising. Need to change the phone. Hover the idea in which direction to dig.

  • And $_SERVER['HTTP_REFERER'] n’t looked, it’s on the site where the advertisement is placed or the advertisement provider can still ... - Mike

1 answer 1

When switching from contextual advertising, you can rely on GET parameters. In php you can do the following checks:

 // Для Яндекса if (isset($_GET['utm_source']) && $_GET['utm_source'] == 'yandex.direct') { // Меняем контент } // Для Google if (isset($_GET['gclid']) { // Меняем контент } 
  • The link of this format will not work because of seo. But thanks to your answer, I noticed that when you move from Yandex, a line appears in the browser line (? Utm_source = yandex.direct) on which you can navigate. But from Google, some kind of nonsense (? Gclid =) or is it possible to navigate gclid too? - Harley
  • @ harley, in the case of google you can simply focus on the existence of a variable. Changed your answer. - MichaelPak
  • @harley, and I suggest adding the GET parameters of Google and Yandex to your question. - MichaelPak