Hi there!
Just checked one of your posts and it seems that WPP was unable to insert its tracking script into theme’s <header> section, needed to track visits. Do you have a caching plugin installed on your site? If so, flushing its cache once should fix the issue. Otherwise please check this FAQ.
Hector, could you please check out now? I’ve deactivated all cache plugins but the error persists. Ps.: on the sidebar, it is showing a list of the most visited posts, but it’s from a different plugin that I’m using as a substitute. But I still prefer yours since it displays the posts count per day, week and month. Thanks for the help!
Hi!
I’m a bit busy at the moment, I’ll stop by in a couple of hours and poat back my findings here π
It seems that you’re either using a modified version of the WPP plugin, or that another plugin or your theme is messing around with WPP. I found this in the source code of your site:
<!-- WordPress Popular Posts v3.3.4 -->
<script type="text/javascript"> execOnReady(function(){
var sampling_active = 0;
var sampling_rate = 100;
var do_request = false;
if ( !sampling_active ) {
do_request = true;
} else {
var num = Math.floor(Math.random() * sampling_rate) + 1;
do_request = ( 1 === num );
}
if ( do_request ) {
/* Create XMLHttpRequest object and set variables */
var xhr = ( window.XMLHttpRequest )
? new XMLHttpRequest()
: new ActiveXObject( "Microsoft.XMLHTTP" ),
url = 'http://universodavitoria.com.br/wp-admin/admin-ajax.php',
params = 'action=update_views_ajax&token=47032ab801&wpp_id=3264';
/* Set request method and target URL */
xhr.open( "POST", url, true );
/* Set request header */
xhr.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
/* Hook into onreadystatechange */
xhr.onreadystatechange = function() {
if ( 4 === xhr.readyState && 200 === xhr.status ) {
if ( window.console && window.console.log ) {
window.console.log( xhr.responseText );
}
}
};
/* Send request */
xhr.send( params );
}
}); </script>
<!-- End WordPress Popular Posts v3.3.4 -->
The execOnReady function at the beginning of the script isn’t part of the plugin. And it appears not to be working either anyways since WPP’s script is not being executed at all. Remove that and WPP will be able to track your posts and pages without problem.
Modifying plugin’s code directly isn’t recommended either. Future upgrades will overwrite whatever changes made to it.
But where is that code located? I’ve searched for it on wordpress-popular-posts.php but could not find it.
You can find it inside the wordpress-popular-posts.php file, in the print_ajax() method starting line 1349 (WPP version 3.3.4).
hi all, i have the same problem, i clear my website hosting cache as well as the WPP cache yet i keep getting the “No data so far” message.
on my local server (using xampp) it is working fine, but when i have uploaded it to my godaddy account problem started.
i am using WPML plugin on both local and liveenvirinment, as i wrote – on the local env its running just fine.
i have disabled WPML but that also didnt help
-
This reply was modified 9 years, 9 months ago by
yos.c.bd.
Hector, I’ve deleted that part of the code but the error persists :/
Hi there!
Just checked your site again and WPP’s tracking script is still missing. Did you clear your “website hosting cache” already?