The role of digital marketing in analysing consumer psychology

What is the role of digital marketing in analysing consumer psychology, and how does it motivate consumers with their choices?