Plugin track visits only for me when logged

[ad_1]

Hi @adesane,

It seems that there’s a conflict with one of your other plugins. WPP’s script has been altered on your site (I guess that by some kind of site optimization plugin), this is what I’m seeing now:

<link rel="preload" as="script" href="https://adesane.com/wp-content/plugins/wordpress-popular-posts/assets/js/wpp.min.js?ver=7.1.0">

And this is what it should look like instead:

<script type="text/javascript" id="wpp-js" src="https://adesane.com/wp-content/plugins/wordpress-popular-posts/assets/js/wpp.js?ver=7.1.0" data-sampling="0" data-sampling-rate="100" data-api-url="https://staging.cabrerahector.com/wp-json/wordpress-popular-posts" data-post-id="0" data-token="f6b19dcc15" data-lang="0" data-debug="1"></script>

That’s why the plugin isn’t currently tracking views by visitors.

You’ll need to exclude WPP’s script from whatever you’re using to “optimize” your site, see Is WordPress Popular Posts compatible with plugins that minify/bundle JavaScript code? for more details.

If you have any further questions please let me know.

thanks I just saw I was blocking REST API requests for non logged users, I had to turn it back on then and it works

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer