Answer the question
In order to leave comments, you need to log in
Can you suggest a way to keep impression/click statistics for images?
Taking into account the fact that images are shown on pages with pagination. Those. let's say there are 10 posts with a preview picture on the 1st page, 10 on the second, and so on. How to count the image display and then write to the database? With a click, it seems clear, he clicks and clicks in Africa.
If you are interested for what, I will tell you: there is a post, for example, with 20 pictures. It is necessary to calculate the rating of each image (impressions \ clicks ratio), and set the one with the highest rating as the main and most interesting one. For example, we make 1000 impressions for each photo of the post, then we set the most clickable one as a preview.
I hope I explained clearly.
Answer the question
In order to leave comments, you need to log in
What is "impression": loading on the page or presence (and/or finding the given/maximum time) in the visible area of the browser window?
On the event of changing the scrolling or the size of the browser window, we call a function that returns an array of elements [image, points] from the center of the browser window to the edges with a decrease in the "cost" of the cell, taking into account the threshold time spent.
A "weight map" of the necessary elements is compiled and further - you can send it with ajax at any time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question