How a Programmatic Ad Campaign Is Optimized