Exclude JS: What am I Doing Wrong?
-
I’m trying to exclude Statcounter from getting minified, combined, and deferred, all of which I have turned on. Under Tuning, I have added “counter_xhtml.js” to the JS Excludes field, but I still can’t get Statcounter to track–unless I deactivate the plugin.
Any suggestions?
Guest Mode is off, and I did try to use the URI Excludes field in Tuning, but I’m not sure what to add or how to add it, so I may have done something wrong there.
My full js for statcounter is…
<!-- Start of StatCounter Code for Default Guide --> <script type='text/javascript'> var sc_project=*********; var sc_invisible=1; var sc_security="*********"; var sc_https=1; var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "https://www."); document.write("<sc"+"ript type='text/javascript' async src='" + scJsHost+ "statcounter.com/counter/counter_xhtml.js'></"+"script>"); </script> <noscript><div class='statcounter'><a class='statcounter' href='https://statcounter.com/free-web-stats/' title='web stats'><img alt='web stats' class='statcounter' src='https://c.statcounter.com/*******/*******/1/'/></a></div></noscript> <!-- End of StatCounter Code for Default Guide -->
…and I have it manually added to the footer of my site.
I did some Googling on this and see Statcounter didn’t work with a few other caching plugins–WP-Rocket for one (https://github.com/wp-media/wp-rocket/issues/4654)–and they had to fix it in an update. So I guess there is a chance it doesn’t work with Litespeed.
Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Exclude JS: What am I Doing Wrong?’ is closed to new replies.