Optimizing Your Ads as You Buy Data