this is the source code for the chrome extension listed here: https://chrome.google.com/webstore/detail/rum-for-ad-visibility/nbibhklkhjjjhnpjjejhjcpegpbnnfkn
https://calendar.perfplanet.com/2018/adrevenue/ gives you some idea on my motivation of why we do this