How best to implement a mechanism for affiliate / referral links? Did not come across before, it was necessary to quickly roll out immediately to production.

Two options while in my head:

  1. Another visitor comes with a get-parameter ?utm_source=VasyaInviter (they will understand him and Yandex at the same time). If not yet, it receives cookies invitedBy=VasyaInviter , a record is written to the database about how well Vasya is.
  2. referral traffic to drive on spec. url type site.ru/ref/VasyaInviter , there process, put down a cookie and transfer to the main page.

What do you think is better?

    2 answers 2

    Personally, I would choose the first option. First of all, you can immediately see which page you are navigating to. Secondly, it works more transparently.

      Yandex with Google will not understand utm_source if you immediately redirect. For you to see transitions with this parameter in statistics, you need the page with the counters to load before sending the data to the Yandex and Google databases.

      Because you do not have some other second option. Only the first.

      • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - From check queue - elik
      • @elik did you read the question? What does my answer mean to you? - sanmai