• Resolved mgerrard

    (@mgerrard)


    On January 19th my stats started disappearing on two websites I publish, Travel Distilled and The Vodka Guy. I publish several other websites and they don’t seem to have been affected.

    I also use Google Analytics and that shows that both websites are still receiving visitors at about the same rate as they were before January 19th, a few hundred each day for one site, and 50-100 per day for the other, whereas Jetpack is reporting no visitors. I’ve done screenshots of the Jetpack stats but I can’t see how I can attach them to this post.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    Thread Starter mgerrard

    (@mgerrard)

    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!

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    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.

    Thread Starter mgerrard

    (@mgerrard)

    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!

    Thread Starter mgerrard

    (@mgerrard)

    Thanks very much. I’ve done that so will see if it works.

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    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).
    Thread Starter mgerrard

    (@mgerrard)

    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!

    Thread Starter mgerrard

    (@mgerrard)

    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.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Stats suddenly disappeared’ is closed to new replies.