In recent years, mobile commerce is developing rapidly because of the popularity of mobile devices. However, for the difficulty of the mobile device input, the users of the e-commerce websites usually don’t log on the website when they are browsing, which resulting in a situation that a large number of website visitors are anonymous users. In order to increase sales revenue and expand market share, an effective prediction of anonymous users’ purchases proneness is very helpful in providing targeted marketing strategy for website to induce anonymous users to purchase. In the past, customer segmentation was mainly analyzed and modeled by customers’ historical data. But the history data of anonymous users can’t be obtained on mobile commerce sites. This method is difficult to put into management practice. In order to solve this problem, this paper proposes a method based on random forest of using user clickstream data to forecast purchase proneness in real time. This method includes two stages: the model training part and the user purchasing proneness prediction part. In the model training part, a classifier based on random forest algorithm is trained. In the users' predicting part, the classifier is used to predict the user's purchase proneness in real time. The method proposed can be effectively applied in the real-time prediction of anonymous users' purchasing proneness, and the results of prediction will help enterprises implement the marketing measures in real time.