• Resolved cisn001

    (@cisn001)


    Hi,

    Our website started to experience the following problem with Google Site Kit: “Data error in Analytics 4. The server provided an invalid JSON response.”

    Retry button did not help. The same problem while all other plugins were deactivated in the troubleshooting mode and our site theme was switched to a default one.

    Please let us know about any additional information needed or your possible solution to the problem.

    Thank you.

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out, and sharing the troubleshooting steps you’ve undertaken. While the error indicates a server/hosting related error, let’s perform some additional checks to help determine the cause. In order to do so, please share the following:

    1. Your Site Health information. You can use this form to share privately if preferred.??
    2. Can you confirm that you don’t encounter any issues setting up Site Kit from this disposable WordPress site?
    3. Do you see any warnings or errors when checking your Site Health status (Tools > Site Health > Status), which differs from your Site Health information requested above? Such errors may include REST endpoint references.

    Let me know if you have any questions with the above. Note also that while you have checked Site Kit with all other plugins deactivated, you may also wish to use the Health Check & Troubleshooting plugin, which is an easier way to perform the same test with only Site Kit active.

    Thread Starter cisn001

    (@cisn001)

    Thank you James. I have shared privately my Site Health info.

    Plugin Support James Osborne

    (@jamesosborne)

    Appreciate you sharing the additional details @cisn001. It does indeed look like your facing some REST errors based on your Site Health status. Site Kit, like many other WordPress plugins, rely on your WordPress REST API.

    While this is likely hosting related, please follow the steps below:

    1. Login to your live site from a Chrome browser incognito window.
    2. Install and activate the Health Check & Troubleshooting plugin.
    3. Navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”.
    4. From the same screen click on the “Available Plugins” tab at the top right and then click on the “Enable” option next to “Site Kit by Google“.
    5. Visit the Site Kit dashboard once more

    Let me know how you get on with the above, or ask if you have any questions.

    If the same error occurs, please go ahead and check can you complete Site Kit setup from this disposable WordPress site as previously requested.

    Thread Starter cisn001

    (@cisn001)

    Thank you James. REST errors started to appear recently and just from time to time… I will try to perform the steps stated in your reply later today and will let you know.

    Plugin Support James Osborne

    (@jamesosborne)

    Great! Let me know how you get on, or ask if you have any questions. Thank you.

    Thread Starter cisn001

    (@cisn001)

    I have followed your steps 1-5 – the same problem with Site Kit. Tried to remove the plugin and complete its setup from your link – the same errors… Are there any other solutions to the problem?

    Plugin Support James Osborne

    (@jamesosborne)

    Sorry to hear that @cisn001. If your WordPress REST API is not working as expected, Site Kit will encounter such errors. Did you check with your hosting provider for any ModSecurity or firewall related issues?

    Tried to remove the plugin and complete its setup from your link – the same errors… Are there any other solutions to the problem?

    Just to confirm, you ran into the same REST errors on a TasteWP site with Site Kit active? If so, there may be something localy impacting your setup. Can you share a recording of this experience on a TasteWP site. You can use a service such as Loom or RecordIt to share a screen recording, while using the same form previously used to share this privately.?

    Thread Starter cisn001

    (@cisn001)

    Thank you James. I will try to contact my hosting provider and inquire on possible ModSecurity or firewall related issues.

    I do no use TasteWP services…?

    Hi Guys , Im experiencing that problem for a while now. I couldn’t find reason why it happens . Is there any chance #cisn001 you are using Hide my Wp plugin or some similar security addon? Or did you change/made custom wp-json path in your system?

    Plugin Support James Osborne

    (@jamesosborne)

    @cisn001 Great! Please do let me know how you get on after checking. We need to get your site as a stage where there are no WordPress REST API errors when checking your Site Health status.

    @borgcollective If you’d like to open an individual support topic we can communicate with you from there. Please include any details relevant to what you’re experiencing. This may include sharing your Site Health information and any notices regarding your REST API when checking your Site Health status.

    Thread Starter cisn001

    (@cisn001)

    @borgcollective?we do not use Hide my Wp plugin

    Thread Starter cisn001

    (@cisn001)

    James, we have turned off ModSecurity for our website, but the result is the same: Data error in Analytics 4 / Invalid JSON response.

    As I can see the problem is with your plugin itself, and the best option is to deactivate Site Kit for a while and try to return to it in the future, when the problem is found and solved in general. Thank you for your assistance.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update @cisn001. If the error is not occurring on your TasteWP site this can help rule out a plugin specific bug. If you do wish to check this you can use this TasteWP site without having a TasteWP account.

    If you do wish to give the plugin another try, one additional option is to set up a new clean WordPress install on the same hosting platform. Do let me know if you wish to perform this check, or ask if you have any questions.

    Thread Starter cisn001

    (@cisn001)

    Thank you James. We have already removed Site Kit from our installation and are not going to return to it again until all the problems with its code are resolved on your side in general.

    Plugin Support James Osborne

    (@jamesosborne)

    Sorry to hear that @cisn001, but I completely understand. I’ll close this support topic but if you do decide to give the plugin another try going forward, you may wish to check does the same occur on another site on the same hosting platform first, or using another WordPress install.

    While we’re not aware of any bug specific to Site Kit that results in such a server related notice, I am happy to check this further with you should the issue persist going forward. We would need some additional checks as per the above suggestions first, as any WordPress REST API errors are not Siite Kit specific. Best of luck!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Data error in Analytics 4 The server provided an invalid JSON response.’ is closed to new replies.