Basically the company that the ad is for pays whoever is pushing out the ad a certain amount. This is based on how many users would see the ad in most circumstances. So for example i give you 500 euro’s for showing my ad for a week. This however is a very ineffective way of measuring how much it should cost so usually they go by viewer that saw it with a minimum required payment. Youtube for example says 10 euro’s minimum and for every person that sees it its 10 cent.(i think although their rates may have changed since i last checked)
Latest Answers