In the rapidly evolving platform economy, online platforms have emerged as pivotal providers of digital services to sellers. The paper investigates how online platforms optimize service strategies based on consumers’ purchase behavior, influencing sellers’ pricing and social welfare. Using a two-period Hotelling model and a cooperative game framework, we discover that the optimal service strategies of a platform with data collecting capabilities are collaborating with two sellers to offer to extend services to new consumers in the second period, maximizing profits for all sellers and platform. Applying Shapley value analysis, we determine the platform’s equitable service charge strategies. When sellers adopt behavior-based pricing (BBP), the pricing escalates in the first period, and the platform’s optimal service strategies also enhance the pricing of sellers. However, in the second period, BBP intensifies competition, leading to generally lower pricing. Our findings suggest that optimal pricing in the second period for new consumers should increase with enhanced quality perception, which is provided by the platform’s digital services and heightened by consumers’ privacy concerns, while decreasing for regular consumers. Lastly, we offer policy recommendations, exploring optimal regulatory scenarios—limiting or not limiting data collection—to maximize social welfare or consumer surplus, and the Mathematica software is used to identify distinct optimal policy intervals.