Plugin Contributor
csonnek
(@csonnek)
Happiness Rocketeer 🚀
Hi there:
Looking at your site’s page source, it looks like our stats tracking javascript is not being set in your page’s footer.
What we should see is: https://stats.wp.com/e-202104.js
and it’s missing from both sites. That would explain why we’re not recording stats – the thing we use to track and send the statistical data is missing.
Since the Stats module is active on both sites, it could be a problem with your theme, a conflicting plugin, or misbehaving advertising code. Based on our data on our end, the problem started on or around January 20th.
If you had a theme update on that day (since you’re using the same theme on both sites) check to make sure it still has the wp_footer()
function in the footer.php file as that’s what we use to insert the stats javascript.
I hope that clarifies things. Let us know if you still have trouble after reviewing things and we’ll be happy to take a closer look.
Thanks for that. I appears that the footer is blank. Do I need to paste this text into the footer:
wp_footer()
I wanted to check first so as not to mess anything up!
You’ll need to include it inside a ‘do_action’ as shown here:
https://developer.wordpress.org/reference/hooks/wp_footer/
It may be worth contacting your theme author as there should be a wp_footer in your theme, so if it’s missing there could be an issue with the theme.
Thanks but I’m not techie and need a simpler answer. What do I need to put in my footer?
Is it
wp_footer()
Or is it?
do_action( ‘wp_footer’ )
Or what?
Thanks for your help and sorry to be dumb.
Plugin Contributor
csonnek
(@csonnek)
Happiness Rocketeer 🚀
To correctly add the wp_footer
function to your WordPress theme, open the theme’s footer.php file and add the following line of PHP code before the closing </body>
tag:
<?php wp_footer();?>
NOTE: if you apply any theme updates in the future and if the theme developer hasn’t fixed the problem, you’ll likely need to add that code again.
I hope that helps!
Thanks very much. I’ve done that so will see if it works.
It looks like there’s an error with the code, as it’s appearing like this:
https://d.pr/i/iKF2DZ
Did you copy and paste the exact code from the comment above? Where exactly did you add it?
-
This reply was modified 3 years, 6 months ago by
Dan (a11n).
-
This reply was modified 3 years, 6 months ago by
Dan (a11n).
Thanks, Dan. I cut and pasted the exact code from the previous post into the Footer file that is under the theme’s general settings, but it didn’t work. However, the theme I used had an update today so I’ll see if that makes any difference.
What’s curious is that I also write for a drinks website, and I have access to their dashboard to upload my posts. They get something like 10-15,000 views a day. On January 17th and 18th they got under 200 each day, but then went back to normal. Something’s clearly wrong somewhere!
It seems it must have been an issue with the theme. Now it’s been updated, the stats so far for today are clearly returning on both the affected sites. Thanks to everyone for their help.
Hey @mgerrard,
What’s curious is that I also write for a drinks website, and I have access to their dashboard to upload my posts. They get something like 10-15,000 views a day. On January 17th and 18th they got under 200 each day, but then went back to normal. Something’s clearly wrong somewhere!
I can’t tell you for sure, but possibly what happened there was just a bit of delay in updating the stats.
It seems it must have been an issue with the theme. Now it’s been updated, the stats so far for today are clearly returning on both the affected sites. Thanks to everyone for their help.
This is great news 🙂 I’m going to mark this thread as solved. If you have any further questions or need some more help, you’re welcome to open another thread here. Cheers!