phpAdsNew   Home  

 

 

 

  5.4 Weight and impression frequency  

 

Let's say you just added all kinds of banners to phpAdsNew. Everything works perfectly, but one client wants to have his banner displayed twice as much. It is quite easy to achieve this behaviour. The probability of how much a banner is displayed is affected by two things. The campaign weight and the banner weight.

 
   
  5.4.1 Banner Weight  

 


First let me explain the banner weight. By default all banners have the same weight of 1. This means every banner has the same probability of being displayed. By using the admin interface you could change the banner weight of one or more banners to another value. For example if you change the banner weight of banner A to 2 and the weight of banner B is 1, banner A will be displayed twice as much as banner B. If you decide to set banner A to a weight of 10, banner A will be displayed 10 times as much as banner B.

By altering the weight it is possible to determine which banners will be displayed more frequently. This way you could decide to show important banners more frequently and provide a better service to a client and help him create a bigger impact of his banners:
The frequency of how much a banner is displayed is directly affected by the weight of the banner.

Banner A Weight 4
Banner B Weight 12
Banner C Weight 3
Banner D Weight 1


The total weight of all banners is 20. It is now quite easy to determine how many times each banner will be displayed. A banner with weight 1 will be displayed in 1/20th = 5% of all impressions.

Banner A Weight 4 Will be displayed in 4/20th = 20% of all impressions
Banner B Weight 12 Will be displayed in 12/20th = 60% of all impressions
Banner C Weight 3 Will be displayed in 3/20th = 15% of all impressions
Banner D Weight 1 Will be displayed in 1/20th = 5% of all impressions


If we add the average number of impressions each day to the equation it is very simple to determine how many impressions each add will get on any given day.
For example: the average number of impressions each day is 20000, the results would be:

Banner A Weight 4 20% 4000 impressions each day
Banner B Weight 12 60% 12000 impressions each day
Banner C Weight 3 15% 3000 impressions each day
Banner D Weight 1 5% 1000 impressions each day


Of course it is impossible to predict the exact number of impressions, due to variations in the actual number of impressions each day. Also if you use random retrieval the banners are selected randomly. The random number generator used is quite good, but it may not distribute impressions evenly over a short period. There is nothing to worry about, statistically it will be distributed evenly over a longer period.

 

 
   
  5.4.2 Campaign Weight  

 


The next factor which affect the number of times a banner is displayed is campaign weight. If you have read the section about banner weight you will find this very easy. It is just an extension to the already described system.

For example: if you take the example from the previous section and divide the banners into two different campaigns:

Campaign N  
Banner A Weight 4
Banner B Weight 12

Campaign M  
Banner C Weight 3
Banner D Weight 1


If we should set the weight of campaign M to 2 all banners which belong to this campaign will be displayed more often than before:

Campaign N Weight 1  
Banner A Weight 4 Campaign Weight (1) * Banner Weight (4) = 4
Banner B Weight 12 Campaign Weight (1) * Banner Weight (12) = 12

Campaign M Weight 2  
Banner C Weight 3 Campaign Weight (2) * Banner Weight (3) = 6
Banner D Weight 1 Campaign Weight (2) * Banner Weight (1) = 2


The total weight of all banners is now 24, which will result in the following impressions:

Campaign N Weight 1      
Banner A Weight 4 1 * 4 = 4 16.66% 3333 impressions each day
Banner B Weight 12 1 * 12 = 12 50% 10000 impressions each day

Campaign M Weight 2      
Banner C Weight 3 2 * 3 = 6 25% 5000 impressions each day
Banner D Weight 1 2 * 1 = 2 8.33% 1666 impressions each day


You may have noticed that while we have increased the weight by a factor of 2, the number of impressions are not two times as large. The reason for this behaviour is caused by the total weight of all banners. If the total weight increases, the probability of a banner being displayed is reduced. You could solve this problem by keeping the total weight of all banners the same.
In the example above we increased the total weight by 4. If we reduce the total weight of the banners in campaign N by 4, we will achieve the goal of doubling the impressions in campaign M:

Campaign N Weight 1      
Banner A Weight 3 1 * 3 = 3 15% 3000 impressions each day
Banner B Weight 9 1 * 9 = 9 45% 9000 impressions each day

Campaign M Weight 2      
Banner C Weight 3 2 * 3 = 6 30% 6000 impressions each day
Banner D Weight 1 2 * 1 = 2 10% 2000 impressions each day