Smoothing algorithm for even monthly ad placement

Let's say I have 10 ads that appear on a website.

If ad # 1 is to be displayed for 100,000 in a given month, how will you display these ads evenly / smoothly throughout the day?

I need to consider the bursts of traffic, so I can’t just divide 30 days by 100 thousand or 3 thousand impressions per day.

Is there a formula for this type of problem area?

+6
source share
3 answers

Well, on the one hand, you cannot find out how many visits you will receive on your site, so you cannot guarantee that every ad will be shown exactly X times. For example, if ad # 1 should be displayed 100 thousand times, and ad # 2 should be displayed 200 thousand times, but you get only 150 thousand visits, then you cannoy, maybe something is satisfying. And on the other hand, if you get 600 thousand visits, then every other visit should not have advertising. But you cannot predict this in advance.

Therefore, I would advise the same thing as tskuzzy - choose ads at a random level, but adjust their chances so that they get closer to the correct number of views. And, of course, keep track of how many times each ad has been shown, and remove it from rotation after reaching the limit.

Let's look at an example. Suppose you have two ads. Ad number 1 still needs to be shown for another 7 days, and it needs to receive more than 70 thousand views. Announcement No. 2 should be displayed for another 10 days, and another 20 thousand views are required for viewing. Thus, ad # 1 should be displayed on average 10 thousand. Once a day, and ad # 2 - 2 thousand. Once a day. Thus, the probability of occurrence of ad # 1 should be 10 / (10 + 2) = 5/6, and the probability of ad # 2 should be 2 / (10 + 2) = 1/6. Therefore, for every 12 thousand views, you will receive an average of 10 thousand views of the announcement number 1 and 2 thousand views of the announcement number 2. This is what you need.

Recalculate these probabilities at the beginning of each day and add only new announcements at a time. If you add new ads in the middle of the day, this will complicate the situation. However, it will work just as well if you calculate the time in seconds, not days, so you can do it too for greater accuracy. Just keep an eye on performance if you count so often.

+9
source

Calculate the relative share of advertising and show it with such probability at any given time.

Let's say you have 3 ads:

Ad 1 - 1000 impressions Ad 2 - 5000 impressions Ad 3 - 4000 impressions 

You would show ad 1 in 10% of cases, ad 2 in 50% of cases, and ad 3 in 40% of the time. Each time an ad is displayed, update the # remaining impressions and probabilities accordingly.

+2
source

Try to find strings like "ad swapping" +algorithm or "ad round-robin" . Google did not return anything good for the first search; try duckduckgo.com. Vilx- gave a great answer. I will just add what is missing:

The applicant hinted that he was worried about the real likelihood that, with a very high plus (“slashdot effect”), the providers had exhausted ALL the rotation of the advertisement in a short period of time. This was probably never considered until it happened, and it looks like his company is not big enough to achieve this problem. Today, the web 2.0 viral “15 minute glory” makes this problem very real.

Since no one wants to pay for the ad spent on the splash that the “undifferentiated audience” brings, there will be non-technical problems that cannot be solved with code alone.

This leads to the only possible answer: prepare a proposal to exclude exclusive service in advertising contracts to either outline a compensation / re-enrollment policy of% ( unfair to the poster company ), or to stop showing the ad as a whole exactly as expected (for example, some stocks, and sometimes whole stock exchanges completely stop trading when something is seriously wrong - AOL did just that yesterday). In the end, a million ads were served! Now you can open for new customers! (and lose the old ones). Policies will need to be pursued at different levels, but imbalances are widespread. In the end, we know what happens when you completely consume your gangs on the site - garbage and / or rude payment messages that show that renting is not an unfair service besides the traffic with which they have contracted ... limited phone plans data is another example ... you either pay the bill, or lose the customer, or stop providing juices, and also lose them. Lose / lose, so someone must give up some contractual power, and it depends on the sales departments, and not on coders like us.

It also needs to be simulated to see how web pages display “blank” ads when you automatically download a million and one ad in one day in just 1 million planned ads. After all, no one likes to see zero ads for the other 29 business days!

This is a difficult place because content providers (bloggers using a page sponsored by advertisers) are also likely to be insane in reaching the bandwidth limits imposed by your hosting service ... all at the same time as your advertising revenue, the providers cause some then business problems for your midsize company. This is probably discussed in e-commerce school classes, and this is not something that can be fixed.

0
source

Source: https://habr.com/ru/post/894750/


All Articles