Having looked for something similar for a number of our own clients, I feel your pain here.
You've got a couple options here depending on (1) Your level of Wordpress Development Experience and (2) Your budget to provide those features.
For our agency, we use the Hubspot Platform to deliver "Smart Content" Call-to-Actions which change depending on a website visitor's current lifecycle stage in our sales process and allow us to target any metric we'd like to track through automation. These can then be embedded in a Wordpress site.
If you're looking for a Wordpress-Only solution, I'd suggest starting with the LeadIn Plugin: https://github.com/wp-plugins/leadin. This plugin (also developed by a team inside Hubspot) will track and create profiles for any website user who interacts with a form and let you track their behavior across the site. Tie this information in your database along with the ads you want to display, and you could roll your own affordable solution with a little PHP help. LeadIn also ties into MailChimp which could allow you to do email marketing automation at the same time.
Happy to chat further if I can help provide further detail about either solution!