How to stop measuring stats in some cases?
-
Hi,
First of all I would like to thank for this fantastic and awesome plugin. I am very happy with it!
I really appreciate author’s support and the feature “Load tracker on all pages” was implemented after my suggestion, as far as I remember. Thank you one more time.I have a wordpress post, which offers some kind of calculator and it is often visited, one of the top posts on my site. I know I could do the calculator in JS, but I prefer to send a form and display a result after page load. I have Google ads on my site and the more page loads, the more ads I display.
I want to know how many people got to the bare post, without sending any data to see results. So I added a short code:
if (!empty($_POST)) { remove_action( 'wp_enqueue_scripts', 'tptn_enqueue_scripts' );
It achieved the goal, and the initial visit is counted, but when the visitor enters some data to calculate it, I don’t count visits.
Unfortunately it removes all the advantage of “Load tracker on all pages” and my autoptimize plugin creates a separate js file without just top-10 code, which I don’t want.
What can I do to have top-10 script in the source of the page but somehow have a switch, whether I want to have the visit counted or not?
I know it might be a pretty exotic request, but I would really appreciate if there was a way to achieve it – to have top-10 JS code, but without counting the visit.
It may count something else instead like a dummy post, I don’t mind.Thank you in advance!
- The topic ‘How to stop measuring stats in some cases?’ is closed to new replies.