Well, you have to:
Try running Update analytics.js in Settings > Optimize Analytics to fix this. If this message returns in the next few days, consider replacing WordPress’ pseudo cron with a real cron.
😀
There’s a link in the message. Click on it, and you’ll get all the explanation you need.
Thread Starter
wordgr
(@wordgr)
However, I do not understand why this message is going away. As soon as I go to the setting of WordPress
I’m not sure I understand you correctly. What do you mean with ‘this message is going away’ and which ‘setting of WordPress’ exactly?
Thread Starter
wordgr
(@wordgr)
The message disappears without doing anything, No matter what setting
Ok, that might mean that meanwhile the cron ran and the analytics.js was updated. Is your site a low traffic website? (< 100 visitors/day?)
Thread Starter
wordgr
(@wordgr)
Yes, this is a site with few visitors
Thread Starter
wordgr
(@wordgr)
I did that to see if it works better now!
First you need to disable WordPress’ pseudo cron. To do this go to wp-config.php (located in the root of your WordPress install and add the following line right before the line that reads /* That’s all, stop editing! Happy blogging. */:
define(‘DISABLE_WP_CRON’, true);
Then, open up a terminal, login to your server and run crontab- e. This will open up your cron editor. Then add the following:
*/15 * * * * wget -q -O – http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Ok, so give it a few days. If the message doesn’t return, your cron is working correctly (just to be sure, you did replace yourdomain.com with the adress of your domain, right? ;-))
Thread Starter
wordgr
(@wordgr)
yes I have entered my domain 🙂
Thread Starter
wordgr
(@wordgr)
Thread Starter
wordgr
(@wordgr)
and the message is still coming
“analytics.js doesn’t exist or hasn’t been updated for more than two days. Try running Update analytics.js in Settings > Optimize Analytics to fix this. If this message returns in the next few days, consider replacing WordPress’ pseudo cron with a real cron.”
The security score is due to jQuery (you can see that when you click on the F). WordPress is using a modified version of an ‘old’ jQuery library. It’s essentially a non-issue, but not all performance measurement tools check that accurately.
If the message is still coming, then that means that you haven’t configured the cron correctly. You should contact your hosting provider for help.
Thread Starter
wordgr
(@wordgr)
I didn’t do it myself, my hosting provider did everything for me!
Thread Starter
wordgr
(@wordgr)
I think it works now!
there is a guide to the optimal settings?
Awesome. That’s good to know.
To be honest, there are no optimal settings. It’s built to suit your situation 🙂
But, if I must make a suggestion:
– Snippet type: asynchronous
– Position: header
Then, go to Extensions and enable Stealt Mode Lite (it’ll help you with getting more accurate statistics in Google Analytics)