• Resolved samarart27

    (@samarart27)


    Hi,
    
    I've searched the forum for this topic and found several instances but people don't come back to reply (case closed) or it's not solved.
    
    I've tested the plugin with all the suggestions of those posts, reinstalled and reconnected it and also tested the ipv4 and ipv6 connections to Google and everything is OK.
    
    Site Kit Desktop was working perfectly for years until December 2023… back then, it was an "Analytics 4" error and now it just says "Analytics" but I guess it is still the same, couldn't take a look at it until now because on the same VPS, there are two other sites with the exact same server config and their Site Kit desktops work correctly. Also, on the one that has the desktop error, all the tags for all the services are loaded correctly with consent mode active and there are no issues there. The only problem is on the desktop side with the Analytics data… Search console and Insights data on the desktop show OK.
    
    So, to clarify, the only problem is the error message on the Desktop side: "Data error in Analytics The server provided an invalid response", everything else Site Kit does works OK…
    
    On the browser console, I see some 502 errors… for example, this URL:
    
    googlesitekit-vendor-d596d3a178eca45071b7.js:7
    /wp-json/google-site-kit/v1/modules/analytics-4/data/report?metrics%5B0%5D%5Bname%5D=totalUsers&dimensions%5B0%5D%5Bname%5D=date&startDate=2024-03-03&endDate=2024-03-30&_locale=user 502 (Bad Gateway)
    
    Or this other type of message:
    
    googlesitekit-api-d40e32ef0f9473e8a1f1.js:3 Google Site Kit API Error method:GET datapoint:report type:modules identifier:analytics-4 error:"The response is not a valid JSON response."
    
    But in the Apache logs, those requests return a 200 response, not a 502.
    
    Any help or idea will be greatly appreciated.
    
    Best regards…
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out @samarart27. Given that you’re encountering a “Data error in Analytics The server provided an invalid response”, please share the following and we can investigate this further:

    1. Your Site Health information. You can use this form to share privately if preferred.??
    2. How long has this been occurring, and have you tried disconnecting the Analytics module and connecting once more, or any other troubleshooting steps other than reviewing your error logs?
    3. Do you see any warnings or errors when checking yourSite Health status? (Tools > Site Health > Status), which differs from your Site Health information requested above? Such errors may include REST endpoint references.

    Once we have the above, we can investigate this further. Based on your mentions of the 502 errors, this could be host related, but we can perform some additional checks once we have the above information.

    Let me know if you have any questions with the above.

    Thread Starter samarart27

    (@samarart27)

    Hi @jamesosborne, thanks for your reply…

    1. Form sent with the requested info plus some other stuff regarding the 502/200 responses.

    2. Since Dec. 2023. I’ve already tried several times disconnecting and reconnecting (usually after every Site Kit plugin update), removed the plugin completely, even tried connecting with other account that has all the necessary permissions for that site and always with the same error in the desktop section… before Dec. 2023, everything showed correctly in the desktop and until now, the other sites on the same server have their Site Kit dashboards working correctly…

    3. No warning or nothing critical, just a WP consent API complaining about other plugins not being compliant, but I installed that last month because of the consent mode v2… nothing to do with the problem at hand.

    Best regards.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update and very useful screenshots @samarart27, much appreciated.

    I suspect that the “server provided an invalid response” messages you’re seeing within the Site Kit dashboard as as a result of your server configuration of firewall, in particular if you’re using a VPS as per your Site Health information. To troubleshoot this further, can you perform the steps below, which will help rule out third party plugins, browser features or browser extensions impacting setup.

    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. Check for the same error, in particular after changing the reporting period once more so fresh updates are gathered.

    If the same occurs when performing the above, please share any invalid XHR response and we’ll troubleshoot further.

    Thread Starter samarart27

    (@samarart27)

    Hi @jamesosborne, thanks again for your reply… now it’s solved…

    Just to note, there is no outbound firewall installed… I don’t know if you were referring to something like that…

    All the following was done in incognito mode with developer tools open with cache disabled:

    Anyway, tried what you suggested and the dashboards finally worked correctly again. Tried activating everything and it kept working. Logged out and in and it didn’t work…

    After going up and down in troubleshoot mode several times, enabling and disabling in different orders and quantities and login out and in on every change, finally found the culprit:

    https://www.ads-software.com/plugins/query-monitor/

    It always worked with Site Kit and weirdly, on the other two sites on the same server, it’s also installed and those Site Kit dashboards don’t show any error. If they ever show any error, I now know where I’ll start looking.

    Thanks for your help!

    Plugin Support James Osborne

    (@jamesosborne)

    Appreciate the update @samarart27, and great find by narrowing down the cause. I checked this further it looks like we are making changes to the plugin to account for this conflict, which occurs with one of the Site Kit plugin dependencies and the Query Monitor plugin, as per this comment.

    If you encounter any further issues, be sure to reach out. Thanks again and best of luck.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Data error in Analytics (just Desktop, nothing critical)’ is closed to new replies.