Okay, I’ve found a workaround to my problem.
Primarily I needed the post views counter to work even when cached pages are viewed, so I found this plugin Ajaxize which converted my post-views function to ajaxed div. I added this new div to my footer.php, so it keeps tracks of my views dynamically.
Even though the counter doesn’t update until a new cache file is generated, the total post views tracking works fine.
I’m trying to do the exact same thing. Unfortunately, all the tutorials and threads don’t seem to explain where the different pieces of code need to be placed.
I have a single post-views.php file that I need to exclude from caching, and i’d be grateful if someone could simplify in simple language what z9.io and the dynamic-cache-test.php are explaining on what to do.