Offering discounts to new customers or to past customers are both examples of behavior-based price discrimination. We propose a three-stage Hotelling-type model that encompasses both cases. Its key feature is that consumers incur not only switching costs but also staying costs. We show that both of duopoly firms strategically choose behavior-based price discrimination in equilibrium. We find that firms offer discounts to new customers in inertial markets with more consumers who have high switching costs, but offer discounts to past customers in markets with more variety-seeking consumers that have high staying costs. In either case, profits are larger with behavior-based price discrimination than with uniform pricing. Furthermore, we show that when firms choose their product locations in a market with both switching costs and staying costs, the principle of minimum product differentiation holds.