okay here is the final for those who want a more complex algo
final
-----
1; $_POST[priority] = @round( (((($d['day']['cd']/$d['day']['od'])*100)*0.7) + ((($d['day']['ud']/$d['day']['rd'])*100)*0.3)) + ( (((($d['day']['rd']-$d['day']['od'])/$d['day']['rd'])*100)*0.25) + ((($d['day']['rd']/$d['day']['od'])*100)*0.75) ) );
--------------------
explanation of algo
--------------------
Algo has 2 big parts, one part is QUALITY factors, other part is SCALE of exchanged traffic factors.
These 2 scores are added up.
1.Quality factors:
------------------
The quality part of the algo is made up of two quality sub algos:
1.1 24 hours value(also known as effect) with weight of 70%
---------------------------------------------------------------
This can be trabslated to "cost of sales" or "cost of transaction".
Its clicks/outs. So basically favors trades where cost of transaction is low.
It is self-regulating, so for example value will start to fall if trade cannot return more to us,
value will also start to fall if we "drop out" from trades toplist positions, and so we start to get
lower productivity traffic.
Gets 70% weight from the algo quality part.
and
1.2 24 hours unique 2 raw ratio with weight of 30%
------------------------------------------------------
This checks the proportion of unique ins to raw ins. uniques in daily / raw ins daily.
1 means that unique = raw, this is best scenario for quality, the lower this number,
the less uniques is in the mix.
Favors trades with high unique % in the mix. (Basically punishes small trades that can't send us uniques. We are all after uniques, right?)
Gets 30% weight from the algo quality part.
2.Scale of exchanged traffic factors:
-------------------------------------
The scale of exchanged traffic part of the algo is made up of two sub algos:
2.1 Daily urgency (also known as TOTAL_RELOWN, total relative owed), with weight of 25%
-------------------------------------------------------------------------------------------
This is daily owed / daily raws in.
Basically it means urgency to give back traffic to this trade, example:
situation1:
owed=20 (we owe this trade 20 hits) daily raw ins from this trade = 25. so: 20/25 = 0.8
This means high urgency, (the highest urgency would be 1) , we owe this trade a very high percent of the traffic compared to the total traffic he sent.
situation2:
owed=20 (we owe this trade 20 hits) daily raw ins from this trade = 50. so: 20/50 = 0.4
Here, he sent us 50 raws, but we already sent back 30 hits (thats how owed is 20: 50-30=20). So urgency is much lower, only 0.4.
Gets 25% weight from scale part of algo.
and
2.2 Owed 24 hrs ratio raw, with weight of 75%
-------------------------------------------------
This checks raws in daily / outs daily.
If we owe them this is bigger than 1, and so final priority will be higher,
if lower than 1, they owe us and so final priority number becomes smaller.
examples:
situation1:
24 hrs raws in=50 , 24 hrs outs=40. Here, score is 50/40= 1.25 we owe them 25% more traff than they owe us.
situation1:
24 hrs raws in=50 , 24 hrs outs=60. Here, score is 50/60= 0.83 they owe us 17% more traff than we owe them.
Gets 75% weight from scale part of algo.
Note that in all cases, we multiply base score by 100 to avoid low scores and bad precision.
Of course you can change the weights as you like
Enjoy!
dont forget to put
$config['allow_eval'] = true;
in
includes/config.php