Error: The response is not a valid JSON response.
-
I changed account to a property and when I’m trying to connect it agian it sais Error: The response is not a valid JSON response.
The page I need help with: [log in to see the link]
-
Hi @askgdb,
Thanks for reaching out. As this specific error can have various causes please share the following and we can advise on this further:
- Your Site Health information. You can use this form to share privately if preferred.
- Does this occur only if you change the Analytics account/property, or does this also appear when selecting an existing account or property?
- 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.
Let me know if you have any questions with the above.
There are no Rest Api errors and troubleshooting didn’t fixed the problem.
In your test site it connects as it should. In my site when I try to choose an existing data stream in GA4 proprty it shows the JSON error, when I choose to create a new one, it stacks in progress bar, without anby results, altought it creates the new data stream.
Many thanks for the update @askgdb, and sorry to hear you’re experiencing the same when selecting an existing web data stream. To determine more on this, can you share whether you have full administrator account to the Analytics property which you’ve selected within Site Kit?
Alternatively can you disconnect the Analytics module before connecting once more (Site Kit > Settings > Analytics > Edit > Disconnect Analytics from Site Kit), this time selecting the option to create a new Analytics account (and not just a new web data stream) during setup. This check is only temporarily, and useful to determine a possible permissions based issue.
I creted the stream, so yes I have an administrator account.
I disconnected it and recconected it again before, with no successthe same error when I choose to setup a new property
@askgdb Can I ask you to try this while in a Chrome Incognito browser and let me know if you run into the same issue?
sorry for my delay. nothing changed. the same error with incognito and new update
I disables all the extensions and nothing.
I tried with troubleshooting plugin, still nothing.Thanks for the update @askgdb. What I suspect is happening in your case, is a host level firewall is impacting Analytics configuration. I checked your hosting provider and I can see Modsecurity is provided. Can you temporarily deactivate this before checking once more? Your hosting provider should be able to assist with this.
If the same occurs, I’ll provide you with some further checks to confirm whether this is host related.
it was working before, so how can it be host related?
There can be hosting changes at any stage, including with firewall rules or PHP updates. If you click on any console error on the page where you see this “response is not a valid response” do you see a 403 error? If so, this indicates the error isn’t coming from Site Kit, it’s your server trying to communicate with a Google Analytics endpoint. We also encounter this problem with another Greek based website over the past few days. In that case temporarily disabling ModSecurity allowed them to proceed. In this users case they also had the plugin working previously,
You’ll also see on the Fixing WordPress forums many users report similar issues, or a mention of possible Firewall issues on this guide.
Can you check with your hosting provider whether they can temporary disable ModSecurity while you attempt set up, before then activating once more?
The topic ‘Error: The response is not a valid JSON response.’ is closed to new replies.