Algorithms to make marketing spend more efficient