But a few things you should consider while applying any strategy for exit popup.
1. Never place Adsense in the exit or any popup this is the violation of Google Adsense.
2. This script will come for every page, you need on exit from the domain this is not the solution.
There are lots of popup plugins for WordPress you can use in your blogs.