M
M
Maxim Timofeev2015-11-15 11:25:02
JavaScript
Maxim Timofeev, 2015-11-15 11:25:02

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

2 answer(s)
D
D', 2015-11-15
@webinar

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.

A
Andrew, 2015-11-15
@R0dger

You make links shortening ala site.com/a3 on this page is GA and the transition to the desired one .. then you will calculate according to GA .. so at least discard the duplicates, etc. ... IMHO the fastest way ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question