In this paper, we study optimal contract problems for online display advertisements with pay-per-view pricing scheme. We first provide and analyze a single contract model, which is shown to be equivalent to the newsvendor problem. We then consider a stochastic optimization problem with two different advertisements and show that a contract to display both of them is not optimal. However, we show that a contract to display of both advertisements may be optimal when we consider the publisher's regret. We consider a chance constraint for the publisher's regret and provide numerical experiments that illustrate the change of optimal strategy for different probability levels.