Analytics Account Linking Broken
-
At some point my configuration was broken and when I try to access the Dashboard nothing is connected. When I went to Settings and tried to fix the Analytics error I got:
Error: The response is not a valid JSON response.
I disconnected my Analytics account and tried to reconnect but get the same error with the only option being to create a new account. I can log in to the Google Analytics account fine.
-
Thanks for getting in touch @clubside. There can be a number of reasons why you’re encountering that a “response is not a valid JSON response” error, which typically occurs when there are issues with your WordPress REST API, which Site Kit depends on. To determine more on the cause in your case, and to ensure you can use Site Kit as expected, please share the following:
- Your Site Health information. You can use this form to share privately if preferred.
- 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.
You’ll find out more on some potential causes of this error by visiting a related guide on the Site Kit website.
Let me know if you have any questions with the above. Thank you.
Thanks! I used your form.
I also ran a standard REST test against the site and it responded appropriately.
I have errors and warnings related to outdated components forced by Bluehost like MySQL.
It is definitely a plugin conflict. I followed the linked article’s advice to enable Troubleshooting mode and Site Kit worked fine.
Nice find with the Health Check & Troubleshooting plugin @clubside. Based on the same not occurring in troubleshooting mode, let’s try and determine what plugin could be the cause. Before following the steps below, you may wish to temporarily deactivate Security by CleanTalk, as from the checks I performed, there are configurations here that can impact your WordPress REST API. If the same does occur with this plugin deactived, please follow the steps below:
- Navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”. (once more – as you did previously the previous check).
- 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“, also as you did previously.
- Check your Site Kit dashboard once more, with the error no longer appearing.
- From back in your Health Check plugin click on the “Available Plugins” tab at the top right and then click on the “Enable” option next to the first plugin that is listed.
- After enabling another plugin, check your Site Kit dashboard once more. If the dashboard works as expected, your last activated plugin is not causing the conflict.
- Enable your plugins one by one (see step 4 above) while rechecking your Site Kit dashboard each time until the error re-appears. You’ll need to refresh/reload the source code page each time.
- Once the error appears once more, let me know of the last plugin you enabled. This is likely the plugin that is conflicting with your Site Kit dashboard. We can then perform some additional checks
Let me know if you have any questions with the above. Thank you!
Hey James,
Thanks so much for your detailed response and continued investigation. I’m going to go with your first instinct and say CleanTalk’s Security plugin is the culprit. Is there any information I can pass onto them to investigate how they are interfering with REST and Site Kit? They have a very responsive support team as well (they already fixed a problem where they were appending 10,000 characters to the querystring of the product filtering plugin I use which broke the page 😛) so I think if we go down that path and it still isn’t resolved I’ll do the one-plugin-at-a-time thing. The only one I’d really be suspicious of is Profile Builder as it handles logins and other API stuff in place of WordPress’ normal methods while the other plugins I’m using are focused on WooCommerce and Gutenberg blocks which I wouldn’t think would have an impact on REST.
That’s a good call on the Profile Builder plugin. You can try temporarily deactivating this also, checking does the same occur.
In relation to any suggestions to put to the CleanTalk team, lets first of all check whether there may be a conflict with Site Kit based on a configuration by trying to determine if Site Kit works as normal with this deactivated. With some security plugin configurations, some conflicts with Site Kit are not unexpected, such as changing your wp-admin path after setting up the plugin, or with changes that can impact your WordPress REST API or htaccess file. I’ll keep an eye out for your topic.
I guess I’ll have to go the one-plugin-at-a-time route. I forgot I use Site Kit and CleanTalk Security without issue on a different site I manage. So I will go into Troubleshooter mode, enable Site Kit, make sure all is well with it and then start activating the other plugins except for CleanTalk Security and CleanTalk Anti-Spam as I know on https://outlawvern.com where I have those 3 working fine together. Another suspicious issue: Microsoft Clarity will not activate on the site at all gos into an infinite spinner and on the same site I just mentioned I have all 4 of those working fine together.
Unfortunately it may indeed take such checks to help determine any such plugin conflict. Do let me know if you need any assistance in troubleshooting mode when enabling plugins one at a time, starting with Site Kit.
Interesting also regarding Microsoft Clarity, although I’m not surprised if there are other plugins impacted if there is a configuration issue impacting your WordPress REST API. If you have other sites with the same plugins that are not impacted, it could well be a configuration specific to this one site.
Let me know how you get on anyway.
Hello,
We have tested Site Kit by Google with the CleanTalk plugins (Security and Anti-Spam). No issues were found, statistics is being accumulated throughout several days, charts are also working fine.
The options “Disable REST API for non-authenticated users” and “Disable the WordPress endpoint “users” REST API” were enabled while testing was going. They did not affect the results.
We are ready to help you regarding CleanTalk any day. Either via email:
support@cleantalk.org
Or via a private ticket:
https://cleantalk.org/my/support/openThank you.
- This reply was modified 3 weeks, 5 days ago by SergeM.
@clubside Just checking back in with you to see if you were able to identify a plugin conflict and if you were able to get Site Kit working without issue?
- You must be logged in to reply to this topic.