In digital marketing, the core advantages of scientific and technological means such as artificial intelligence and big data analysis gradually appear and pay attention to them. This paper studies the accuracy of digital marketing and proposes an intelligent algorithm based on data analysis, which improves the effect of marketing communication. Through the combination of intelligent algorithms and big data analysis, the data are convincing. Through the comparison and improvement of intelligent algorithm logistic regression and XGBoost, this paper puts forward an improved algorithm of XGBoost based on Bayesian optimization parameters, which can improve the efficiency of digital marketing communication and enhance the social influence of digital marketing.