Answer the question
In order to leave comments, you need to log in
How to count clicks on a banner?
There is a site on yii2. We need to put up the banners. Didn't do it before. Need advice on how to record click statistics.
There will be a separate table and widget for banners, so impression statistics can be recorded during generation. What about clicks? There was an idea to create an action in which to pass the banner id, when clicked, get there, record statistics there and redirect to the desired page. But at the same time, the URL of the banner will be incomprehensible to the advertiser, and I'm not sure that this is the most correct solution.
Maybe you can open the link in a new window and send ajax to the statistics?
Does anyone have any work? Do not offer connection to third-party services. I'm waiting for ideas. Thank you.
Answer the question
In order to leave comments, you need to log in
See the source of teaser networks, you will find the correct implementation there.
In general, the idea seems simple, but the further you go, the more pitfalls it turns out to be. Therefore, see how it is implemented in various teaser scripts.
In general terms, you described the idea, but then you will have many more questions. How to account for duplicates? How to calculate CTR? How to rotate banners correctly? How to weed out bots?
Etc. Therefore, it is easier to find the sources of existing scripts, and see how others have implemented it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question